curl-library
Re: [PROF RFC 1/2] profiling of libcurl by curl-loader, steady state
Date: Thu, 19 Apr 2007 10:32:30 +0200 (CEST)
On Thu, 19 Apr 2007, Robert Iakobashvili wrote:
>> > 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.
>
> This is already decreases the number of gettimeofday() per each recv call
> for about 20%, which is very good !
Amazing. I wonder if we can dig up more places in the code where we fetch the
time without actually using the results (due to conditions similar like the
one Yang found here),
BTW, I'm fine with this change getting committed since it does seem to make a
noticable difference but it would be great if there was a comment somewhere in
there explaining why the code is written in that somewhat "special" way.
> It could be more places, like Daniel mentioned multi_socket*, to optimize.
I have this task added on my TODO-list in my head, but I'm not sure when I'll
get time and energy to actually work on it.
Oh, a question somewhat related to your profiling work:
Did you measure the speed/performance difference in your app when you changed
curl-loader from curl_multi_perfom() to curl_multi_socket_action()? If so, can
you tell us any numbers?
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-04-19