-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Session requests are ~70% slower in version 2.26.0 #5891
Comments
I dug a little deeper and it looks like all the time is spent inside Note: My OS is Ubuntu 18.04. |
…building proxies if proxies have been supplied. Signed-off-by: David Black <[email protected]>
Thanks @omermizr for finding this issue. In this gist I have a full repro for this latency issue, comparing requests 2.26 vs 2.25.1 packages. We can see that when we have 500 environment variables, there is a huge difference between the versions. But without any variables, there is no difference at all. See here the full details and how to run it by yourself - |
…y not rebuilding proxies if proxies have been supplied." This reverts commit 3c32ae8.
Hi guys. Do you know when in theory this issues might be solved and when new version of the library might be released? |
We expect the current fix to go out with the 2.27.0 release which is currently scheduled for this coming Monday. There is still an edge case where we may see a slow down in environments with a large number of proxies available. The long term recommendation for this is passing the Resolving now that the fixes have been merged for release. |
When using a session, requests are slower than in previous versions.
My metrics indicate a performance degradation, and after some testing I suspect this is the root cause.
Expected Result
Same performance as in version 2.25
Actual Result
When I use a session, requests are about 70% slower than in previous versions.
This seems to be the PR that caused the regression: #5681
I removed the
rebuild_proxies
call locally and performance shot back up.I ran a benchmark on 1000 requests making a real-world request with the same session.
In version 2.25.1 it took ~13s, in version 2.26.0 it takes ~23s.
System Information
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
The text was updated successfully, but these errors were encountered: