curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Aw: Re: DNS Lookup time (CURLINFO_NAMELOOKUP_TIME) performs worse than getaddrinfo()

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 25 Jun 2018 23:15:08 +0200 (CEST)

On Mon, 25 Jun 2018, Bernhard Jaeger wrote:

> But this data are from two different programs so it would be very helpful to
> have an additional timestamp within licurl to see if the initialisations are
> what really makes the difference here. Would it be possible to have that
> feature on a new branch?

I created a PR at https://github.com/curl/curl/pull/2683 with such an
additional time-stamp, but in my tests that time-stamp tends to be in the sub
100 microsecond range...

$ ./src/curl -sw '%{time_namelookup_start} %{time_namelookup}\n' https://www.haxx.se -o /dev/null
0.000072 0.004239

> Unfortunately I don't know what the threaded resolver backend is.

curl can be built to use one of three different ways to resolve host names:

1. the threaded resolver (runs getaddrinfo in a separate thread) - default
2. the synchronous name resolver (using getaddrinfo directly)
3. c-ares

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-06-25