curl / Mailing Lists / curl-library / Single Mail


Re: Time spent in curl_easy_perform on reused connection

From: Daniel Stenberg <>
Date: Thu, 12 Oct 2017 10:53:23 +0200 (CEST)

On Wed, 11 Oct 2017, ViDyAnAnD NiLLe via curl-library wrote:

> In second case(connection reuse) data function is always called after 40ms
> of header callback function.
> What could be reason for data callback function getting called after 40ms of
> consistent delay? I have tried it many times and behavior is same.

When the headers have started to arrive, it is really a matter of the stream
of data to come as fast as possible from the server. The headers and body
arrive on the same TCP stream and if there's a time gap between the headers
and the body in one case and not in the other, I can't think of any
explanation for this in libcurl.

I suspect that if you monitor the streams with wireshark or similar, you'll
note that the gap is visible on the wire.

Received on 2017-10-12