curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Why does libcurl call “gettimeofday” during curl_easy_perform?

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 17 Jun 2020 10:46:25 +0200 (CEST)

On Wed, 17 Jun 2020, Daniel Stenberg via curl-library wrote:

> This said, we *should* minimize the amount of time calls. It has been a
> while since we had a cleanup of that so I'm sure we can improve here - in
> particular by avoiding subsequent calls to Curl_now() when we did one in the
> parent function etc.

I did a test build just now and downloaded 512MB from localhost.

It ended up with *26274* calls to Curl_now(), out of which 26225 of them were
done within 50 microseconds of the previous call.

Now, this is of course from localhost so even the actual transfer part is very
fast but still. I think this calls for better time dicipline in the code...

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-06-17