cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl vs wininet : how to tell (specify to) libcurl the amount (CHUNK) of data to download (CHUNK)

From: Saidus Bounderra <bsaidus_at_gmail.com>
Date: Sun, 15 Jan 2012 14:11:34 +0100

> I'm asking on how to specify or modify the defaut receive buffer size
which
> is CURL_MAX_WRITE_SIZE.

> Can you elaborate on why you need this?

Like i said : this is just for comparaison !!
I write a simple test application that use libcurl to download a File with
360 MB size on localhost using apache webserver the speed is between
11MB/s and 12 MB/s
then I configured Internet download manager (IDMan) witch uses wininet, to
use ONE THREAD to download this file in the same conditions but his speed
exceed 30MB/s (bettween (30 & 40 MB/s))
so I wonder why this difference.
The first thing that comes to my mind is the RECEIVE BUFFER and the
possibility to modify CURL_MAX_WRITE_SIZE.

> The only way to change this is to modify the header value in the code and
> recompile. It's just very rarely actually needed. Most of the times we get
> questions about it, there's some kind of misunderstanding behind it.
> even if I chage the CURL_MAX_WRITE_SIZE value with value *> 16384 * and
> recompile the libcurl It Dont work

> Yes it does. You probably simply modified the wrong header or something.
The
> CURL_MAX_WRITE_SIZE define is the single place that defines the buffer
size
> libcurl uses. But again, there very rarely is a good reason to change it.

the CURL_MAX_WRITE_SIZE define is located in curl.h header in
/curl-7.23.1/include/curl/curl.h
so I have modified this value to 100Kb { 1024 * 100 } then recompiled
libcurl.dll
after use, the amount of data downloaded for each call to Progression
function is MAXIMUM = 16384 and never exceed that.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-01-15