Hacker News new | ask | show | jobs
by tcgarvin 3692 days ago
Does this work with uvloop?
2 comments

Yes!

An initial test last night of a trivial growler app (i.e. one method that replies with a simple string) saw a median response time drop from ~200ms to ~80ms.

(using apachebenchmark, n=1000 c=100)

Wait, p50 using the built in asyncio loop is 200ms?

That seems incredibly slow.

How well would it work with, say, PostgreSQL? Would you need to use async wrappers like aiopg in your views?
For optimal performance, yes use aiopg or equivalent (it looks like there is an asyncio sqlalchemy project which might be nice.)

Any middleware may be a coroutine object, so it's as easy as `await res.render("whatever")` in an async function

do you have this in a github somewhere ? would love to check it out. Also would be nice to see this same thing with postgres DB access.
Does it blend ?
*Will