Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace asyncio event loop with uvloop's implementation #123

Open
mgxd opened this issue Aug 8, 2019 · 2 comments
Open

replace asyncio event loop with uvloop's implementation #123

mgxd opened this issue Aug 8, 2019 · 2 comments
Labels
feature Feature requests

Comments

@mgxd
Copy link
Contributor

mgxd commented Aug 8, 2019

Something to consider: MagicStack/uvloop

uvloop makes asyncio 2-4x faster

@mgxd mgxd added the feature Feature requests label Aug 8, 2019
@effigies
Copy link
Contributor

effigies commented Aug 8, 2019

We could use it opportunistically:

try:
    import uvloop
    has_uvloop = True
except ImportError
    has_uvloop = False

...
if has_uvloop:
    uvloop.install()
asyncio.run(...)

@satra
Copy link
Contributor

satra commented Aug 9, 2019

i'm not sure speed is a key concern at this point. however, we can follow @effigies suggestion to use it opportunistically. it won't be installed by default, but if you do, we can use it. i know sanic uses it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature requests
Projects
None yet
Development

No branches or pull requests

3 participants