curl-library
Re: [PROF RFC 1/2] profiling of libcurl by curl-loader, steady state
From: Yang Tse <yangsita_at_gmail.com>
Date: Wed, 18 Apr 2007 18:34:54 +0200
Received on 2007-04-18
Date: Wed, 18 Apr 2007 18:34:54 +0200
Hi all,
In relation with the profiling you're doing, and what you've mentioned
about the number of times gettimeofday() gets called. I've noticed
that some of those calls can be completely avoided.
The attached patch saves one call to curlx_tvnow(), which calls
gettimeofday(), in each of Curl_socket_ready(), Curl_poll() and
Curl_select() when these are called with a zero or infinite timeout.
I'm not sure if the profiling you're doing would notice the difference or not.
The patch makes the code a little bit more strange, so I would like to
know if it is worth applying it to CVS based on profiling data. Or if
theoretical case is enough to justify commiting it at all.
Daniel, or just leave the affected code as it is ?
-- -=[Yang]=-
- text/plain attachment: timing.patch