cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_easy vs curl_multi - performance

From: Paolo Piacentini <paolopiace_at_hotmail.com>
Date: Fri, 10 Jun 2011 18:33:00 -0700

I'd need to hear some expert opinion, please...

As client, I'm downloading three specific web pages. The process requires exchanging cookies with the server.

The first page is ~400KB. The other two are ~2MB each.

I wrote two programs in C/C++:

One is based on curl_easy and it downloads the three pages one after the other, sequentially. Overall it takes ~15sec.

The
 other is based on curl_multi and it uses the multi-app.c as framework.
Basically, it adds three curl_easy handles together into a multi_handle.
 The download takes ~130sec, nearly 9 times slower.

I wrote the second with the hope to obtain a shorter downloading time.

QUESTION: is such a difference in downloading time between a "sequential" curl_easy and the equivalent curl_multi expected?

I'm looking forward to receiving comments/feedback. Thanks!

And...
 please note that I know little/nothing about networking. It just
happens that I've to download web pages from a commercial server.

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