cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Please advise on how to improve libcurl HTTP GET performance

From: Alex <Alexxxx89_at_ya.ru>
Date: Tue, 11 Oct 2011 21:57:37 +0400

11.10.2011, 21:37, "Dan Fandrich" <dan_at_coneharvesters.com>:
> On Tue, Oct 11, 2011 at 08:39:36PM +0400, Alex wrote:

> naive append() operation in the receive callback, for example, would turn
> a simple download into an O(n**2) operation.

I am now using stub as a callback:

size_t onDownloadCallback( char* ptr, size_t size, size_t nmemb, void* receiver )
{
        size_t actualSize = size * nmemb;
        return actualSize;
}

11.10.2011, 21:44, "Alan Wolfe" <alan.wolfe_at_gmail.com>:
> With that code unmodified and his libraries he built, he got the slow transfer rate he saw before.
>
> With the curl command line utility he gets about 10x as much speed.

Exactly!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-11