-
-
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
requests.get really slow when stream=True #2015
Comments
Hm, if I read the documentation correctly, I would have seen that the default chunk size is 1 byte... so nvm. Is there a rationale for such a small size ? |
As you've spotted, by default Whether this is a good idea or not is unclear. We've got a giant issue that covers this (see #844), and that issue has not been decided emphatically. I'm inclined to increase the size, but wary about the risk of breaking things. Note that the bug here is not to do with streaming: if you use Anyway, the central issue is in #844, so I'll close this to centralise there. |
I noticed that using stream=True is really slow in some cases. Code that shows the issue:
With use_streaming=True, it takes around 40 sec, and only 2 sec when False. Running this script with strace, it looks like the chunk size is 1 byte:
Looks like for some reason the chunk size is ridiculously small ?
I am using requests 2.2.1 on python 2.7 on debian.
The text was updated successfully, but these errors were encountered: