curl-library
Re: Please advise on how to improve libcurl HTTP GET performance
Date: Mon, 10 Oct 2011 23:25:40 -0700
Maybe give this a shot... the command line curl has an option that makes it
spit out c code that you can compile with libcurl. You could do that and
see if you get better performance.
If so, you can try changing things til it goes slow again, or just use that
code as a basis for your code
From http://curl.haxx.se/docs/manpage.html
--libcurl <file>
Append this option to any ordinary curl command line, and you will get a
libcurl-using source code written to the file that does the equivalent of
what your command-line operation does!
NOTE: this does not properly support -F and the sending of multipart
formposts, so in those cases the output program will be missing necessary
calls to curl_formadd(3), and possibly more.
If this option is used several times, the last given file name will be used.
(Added in 7.16.1)
2011/10/10 Alex <Alexxxx89_at_ya.ru>
> Thanks for the advices!
>
> To be on the safe side, I've made onDownloadCallback function to do nothing
> (it doesn't handle the data now, no more using my CByteArray class). Also, I
> have added CURLOPT_REFERER to point to the site's main page.
> No luck - still <40 KB/s. And it's definitely not the CPU that is a
> bottleneck.
>
> > It is worth noting that CURL uses libcurl internally so I would expect
> the
> > same performance...
>
> My thought exactly! What am I missing? What is that thing that CURL is
> doing and my program doesn't?
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-11