cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: performance question

From: T. Bharath <TBharath_at_responsenetworks.com>
Date: Wed, 30 Jan 2002 00:11:10 -0500

Is this for http or https urls

Regards
Bharath

rick vaillancourt wrote:

> Hi all-
>
> 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?
>
> Thanks.
>
> -Rick
>
> /////////////// code snippet
>
> [...]
> if(reconnectEveryTime){
> curl = curl_easy_init();
> }
> if(curl) {
> curl_easy_setopt(curl, CURLOPT_URL, buffy );
> curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writeMemoryCallback);
> curl_easy_setopt(curl, CURLOPT_FILE, (void *)&chunk);
> res = curl_easy_perform(curl);
>
> if(reconnectEveryTime){
> curl_easy_cleanup(curl);
> }
> }
> [...]
>
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
Received on 2002-01-30