cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: "pull" aspect of multi interface not quite working properly

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 2 Jul 2007 00:19:28 +0200 (CEST)

On Mon, 25 Jun 2007, Allen Pulsifer wrote:

> I'm sure it could be made arbitrarily complex. For my purposes, I was just
> looking for the guarantee that a single call to curl_multi_perform() would
> not give my application more than CURLOPT_BUFFERSIZE bytes of data. In
> order to accomplish this, I turn off decompression by setting
> curl_easy_setopt(easyhandle, CURLOPT_HTTP_CONTENT_DECODING, 0) and I made
> those two modifications to libcurl.

[...]

> I think for maximum efficiency, and consistent with the "pull" philosophy,
> an application should only call curl_multi_perform when it is ready to
> accept CURLOPT_BUFFERSIZE bytes of data from each easy handle in the
> multiset.

Well, for maximum efficiency (and avoiding this work) you could also say that
your write callback should be able to cache some extra data in case you'd get
called more than once...

But if you think this is a worthwhile project, I'd like to see a patch from
you that takes more aspects into account so that we can test etc and see that
things still work fine in other areas when introducing this calling limit. I
don't have any plans to work on this myself.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-07-02