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

Improve SSL performance by avoiding SSLWantReadError exception and using much faster checks whenever possible #629

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

tarasko
Copy link

@tarasko tarasko commented Sep 11, 2024

SSLWantReadError is expensive.

python/cpython#123954

This PR tries to predict that there will be SSLWantReadError by checking incoming.pending and SSLObject.pending() first.
This check works in 99% of cases. For the rest 1% we still rely on SSLWantReadError

@tarasko tarasko changed the title Improve performance of ssl reads Improve SSL performance by avoiding SSLWantReadError exception and using much faster alternative whenever possible Oct 15, 2024
@tarasko tarasko changed the title Improve SSL performance by avoiding SSLWantReadError exception and using much faster alternative whenever possible Improve SSL performance by avoiding SSLWantReadError exception and using much faster checks whenever possible Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant