uvloop
uvloop copied to clipboard
Improve SSL performance by avoiding SSLWantReadError exception and using much faster checks whenever possible
SSLWantReadError is expensive.
https://github.com/python/cpython/issues/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