-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Read from response body is very slow #2549
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
Comments
Interesting. Could you include a few more details? What version of hyper is used? Are you compiling with |
I am running with My Hyper version is I am on Mac, but Windows users also experience the issue (a friend tested for me). My full main.rs file is here: https://gist.github.com/Acidic9/2af00500f51b2237fbf23591142a06ab Making the request to In comparison, curl: Using I think the following issues may be related: |
I wonder if there's something else related. So, I've been using hyper's examples/client, which does the same thing curl is doing. Here's what I got:
And:
|
Are you sure the 39 seconds reported by your first call wasn't from compiling the program? |
Yeah it must've been, I didn't notice that. Ignore that one I guess. |
This isn't considered an issue @nox ? |
Been reading the issue too quick and thought the main issue was those 39 seconds of build time, sorry, reopening. |
So, coming back to this, when I run the examples that do the same thing, they have nearly identical timings. I notice that the example you linked includes a for loop to do the request twice, while comparing that to invoking curl which does the request once. Is that perhaps it? |
Same thing here, I'm wondering if this is why the |
I believe that is unrelated to the original issue here. Since it's gone quiet, I'm going to close this one. |
I've written the following code in Hyper as a test:
And running it over and over I get:
I then add to the bottom of the Make request section this one line:
And my results come out as:
For some reason reading from the response body takes on average
446 ms
. Running the same tests in Python, it shows that this is way slower than it should be.I've tested a bunch of HTTP libraries, and only chttp seems to be lightning fast as expected (like Python or any other HTTP client in another language). All the rest are slow, possibly because they are built on top of Hyper and CHTTP uses curl-sys.
There must be some kind of bug with reading the body of a HTTP request. I'm not sure why else it could be so slow.
The text was updated successfully, but these errors were encountered: