curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_multi_add_handle and subsequent timer

From: Maksim Dmitrichenko via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 13 Nov 2017 13:45:43 +0300

2017-11-13 13:09 GMT+03:00 Daniel Stenberg <daniel_at_haxx.se>:

>
>
Then why even bother trying to do something special for this case? libcurl
> tells you the timeout so why not simply adhere to it?

Well.
1) The data I'm trying to acquire with that request is time critical. The
sooner I get it (or deliver to server) the better. Waiting 1 ms for no
purpose is very bad in my case.
2) I've not tested it under the load, but if every request is delayed for 1
ms, than only 1000 request per second is possible. That's very low count.

You asked if you could call perform right away after add handle, and the
> answer is yes. With your oldish libcurl however, chances are that you'd ask
> libcurl to perform something *before* the 1ms has expired and then it still
> won't do anything ... :-O

oldish? you guys are really funny ) RedHat 7 contains even older 7.29.
Updating distro's version to some custom brewed packages is not what is
usually expected in the world of production systems )) so, I would love to
replace this oldish stuff, but I can't.

> It used 1ms back then simply because we used the magic number of 0 to mean
> something else internally. In commit bde2f09d5e4c4a3 that internal quirk
> was fixed so since 7.50.2 (released over a year ago) it doesn't wait 1ms to
> start. Since then it sets the initial timeout to 0ms into the future.

ok.

-- 
With best regards
  Maksim Dmitrichenko

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-11-13