cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multi interface perf question

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 4 Feb 2011 14:03:26 -0800

On Fri, Feb 04, 2011 at 01:29:28PM -0800, Alan Wolfe wrote:
> Quick update... i notice that if i tick the multi interface 20 times per frame
> instead of just once, i get response time back down to the 2-3 second range.
>
> I don't notice any drop in frame rate but i haven't done any real perf tests.
>
> I'm sure it takes SOME more amount of time but not sure how much, or how that
> amount of time might vary from system to system.

It sounds like you're calling curl_multi_perform() in a busy loop, without
checking if network sockets are ready or not. If so, this is not the way it's
supposed to be done. The app is supposed to only call it when there is data
ready to read/write or after a timeout. In the meantime, unless there's
something else for it to do, it should be blocked on a select() or poll()
call or similar. Please read the man page and take a look at the example
code to see how this is supposed to work.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-04