-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-91539: improve performance of get_proxies_environment #91566
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
gh-91539: improve performance of get_proxies_environment #91566
Conversation
…vironment variables
…:eendebakpt/cpython into performance/getproxies_environment
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Carl Meyer <carl@oddbird.net>
0f694c9 to
aeb96ea
Compare
aeb96ea to
f961505
Compare
|
@carljm Thanks for the suggestion. Benchmarks show it is just as fast, and much cleaner code. |
carljm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this in first review, but the name of the function has a typo (extra underscore) in the NEWS entry.
Also suggested an added comment. (Wouldn't have bothered with this if it was the only thing, but may be worth it if you are doing one more update to fix NEWS anyway.)
Thanks for the improvements to this function!
Misc/NEWS.d/next/Library/2022-04-15-11-29-38.gh-issue-91539.7WgVuA.rst
Outdated
Show resolved
Hide resolved
…gVuA.rst Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
@ambv As the latest core dev touching |
orsenthil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thanks @eendebakpt for the PR, and @orsenthil for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
|
GH-97918 is a backport of this pull request to the 3.11 branch. |
|
GH-97919 is a backport of this pull request to the 3.10 branch. |
Improve performance of
get_proxies_environmentwhen there are many environment variables. Improvements depend on the number of environment variables, but the method is several times faster in this PR.Fixes #91539
Performance test details
Results:
with