-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Import time regression #6790
Comments
I'm on Windows, with Python 3.11 and requests 2.32.3 and noticed very slow import times and narrowed it down to requests. In my case when importing requests, the |
We noticed that this slows down yt-dlp startup time by ~50%. yt-dlp provides its own SSLContext, so the one created by requests on import remains unused. Is it still planned to revert the caching of a default SSLContext (#6767) or should the SSLContext no longer be created on import as proposed in #6791? |
Between 2.31.0 and 2.32.3, import time increased by ~25%. This appears to have been caused by #6667, which changed the expensive
load_verify_locations()
to run at import time (in 2.32.0).Reproduction Steps
Compare import time of versions with:
2.31.0
2.32.3:
The text was updated successfully, but these errors were encountered: