Very slow first client request #2234
Replies: 2 comments 1 reply
-
What kind of local server are you using and is the same behavior occurring with e.g. curl or something? |
Beta Was this translation helpful? Give feedback.
1 reply
-
After testing with curl it seems this issue is indeed a Rocket issue and not a reqwest issue. My apologies. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
First the context: using windows, and the blocking API. The test is done against a locally hosted server.
I have noticed that the first request done through a client is always very slow (upwards of 300ms). For instance, these instructions:
take about 320ms, and this time is roughly maintained even if I add extra
send()
s:with each subsequent
get(...).send()
after the first taking around 1-3ms each, which is the time I would expect.My question is simple: why does this happen, and what can I do to fix it? At first I thought it might be a problem with TLS, so I attempted to disable it by specifying
default-features = false
, but this didn't seem to help at all.Beta Was this translation helpful? Give feedback.
All reactions