cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multi interface perf question

From: Alan Wolfe <alan.wolfe_at_gmail.com>
Date: Fri, 4 Feb 2011 14:40:21 -0800

i'm doing a select before the curl_multi_perform with a small timeout (10
usec's)

Now of course it seems obvious what the problem is hehe... i probably should
be using more than 10usec's if i want it to do more work per frame eh?

I'm going to give that a shot... thanks a bunch!

On Fri, Feb 4, 2011 at 2:03 PM, Dan Fandrich <dan_at_coneharvesters.com> wrote:

> 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
>

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