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

async: switch to uvloop #545

Open
oliver-sanders opened this issue Jan 4, 2024 · 1 comment
Open

async: switch to uvloop #545

oliver-sanders opened this issue Jan 4, 2024 · 1 comment
Milestone

Comments

@oliver-sanders
Copy link
Member

uvloop is a fast (C) replacement for the built-in asyncio event loop (Python) that uses the libuv event loop.

Basically it makes asyncio go faster so should make async code more responsive. As the Cylc codebase becomes increasingly async this switch will help Cylc efficiency.

Two line change (+ one new dependency).

See also cylc/cylc-flow#4852

The results of profiling this problematic workflow revealed that the asyncio.ensure_future method was consuming a reasonable amount of CPU. It's likely that uvloop will have lower overheads for these operations.

@oliver-sanders oliver-sanders added this to the pending milestone Jan 4, 2024
This was referenced Jan 4, 2024
@oliver-sanders
Copy link
Member Author

Turns out the large number of async tasks was the result of a recursive async routine.

#548 turns this into an iterative routine bypassing the issue.

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

No branches or pull requests

1 participant