Re: performance question
Date: Mon, 28 Jan 2002 11:49:58 +0100 (MET)
On Fri, 25 Jan 2002, rick vaillancourt wrote:
> I did a very simple performance test of calling the curl lib serially 300
> times in a row with the same URL to measure the difference in reusing the
> same connection v. calling curl_easy_init & curl_easy_cleanup(curl) after
> every execution.
> To my surprise it seemed to be consistently faster when reinitialized every
> time; on average .17+ secs per call reinitializing every time v. .25+ secs
> per call reusing connection.
> Seems contrary to the doco, anyone experience this?
This seems to go against all sense, but I figure there is a perfectly logic
and sane explanation behind! ;-)
I take it this was a rather recent libcurl? What OS? What protocol did you
use? Did the server use persistant connections? Did you use SSL? Did you use
I guess your tests prove that re-using a handle is not always faster that
init/cleanup in between, but I would say that this is nothing but a rare
exception to the rule.
Or can you or anyone else explain this?
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-01-28