cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Feature freeze on May 21

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 16 May 2008 10:48:42 +0200 (CEST)

On Fri, 16 May 2008, Tim Tassonis wrote:

> What do you think about a new option to store the response directly in a
> char buffer, as I proposed earler? I posted a possible implementation two
> days ago and attach it below, I would also rework it if you want something
> changed. Or do you oppose the idea completely?

I honestly don't see the point.

The whole concept is already possible and we provide an example in every
tarball, on the site and the concept is even explicitly mentioned in the FAQ.

I don't think providing this extra helper function/macro will make the
problems go away. The people who can't figure out how to do that already
today, those who can't read the docs or an example code and come up with a way
to use that in their own code, they will still fail with this helper approach
added. We will just lead them one step further into the woods until they get
lost.

Also, in most cases it would make more sense to for example double the
malloc'ed space for each time it runs out memory in the buffer instead of this
realloc in every callback. Meaning that people are better off tweaking the
actual receiver function for their own particular purpose and use-case to get
the most performance out of it.

A concept I would understand and sympathizee with for addition, would involve
providing an _existing_ buffer to libcurl and have libcurl "fill" that buffer
with as little extra internal copies as possible so that we'd gain performance
out of it all. But that is much more work and won't happen before 7.18.2 if at
all...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-05-16