granian icon indicating copy to clipboard operation
granian copied to clipboard

Avoid to run Python event-loop in WSGI protocol

Open gi0baro opened this issue 6 months ago • 1 comments

There's no really any need for the Python event-loop to be running in WSGI protocol; as of today the only reason we run it is to have code shared with other protocols in src/workers.rs.

Not identified any performance gain from these, but avoiding the event-loop ticks definitely makes sense. Implications on the how to actually run the Rust serving loop yet to be made, possibly a block_on wrapped into a py.allow_threads will be enough.

gi0baro avatar Aug 01 '24 07:08 gi0baro