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

Avoid to run Python event-loop in WSGI protocol #364

Open
gi0baro opened this issue Aug 1, 2024 · 1 comment
Open

Avoid to run Python event-loop in WSGI protocol #364

gi0baro opened this issue Aug 1, 2024 · 1 comment
Labels
enhancement New feature or request performance wsgi Issue related to WSGI protocol

Comments

@gi0baro
Copy link
Member

gi0baro commented Aug 1, 2024

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 gi0baro added enhancement New feature or request performance wsgi Issue related to WSGI protocol labels Aug 1, 2024
@gi0baro gi0baro modified the milestone: 1.6 Aug 1, 2024
@gi0baro
Copy link
Member Author

gi0baro commented Sep 3, 2024

From preliminary tests it seems performance is not affected. At least on MacOS arm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance wsgi Issue related to WSGI protocol
Projects
None yet
Development

No branches or pull requests

1 participant