cylc-uiserver icon indicating copy to clipboard operation
cylc-uiserver copied to clipboard

async: switch to uvloop

Open oliver-sanders opened this issue 1 year ago • 1 comments

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 https://github.com/cylc/cylc-flow/issues/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 avatar Jan 04 '24 11:01 oliver-sanders