cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Avoid copying data in CURLOPT_WRITEFUNCTION callback

From: Yehezkel Horowitz <horowity_at_checkpoint.com>
Date: Mon, 13 Feb 2012 13:21:20 +0200

>> It was removed from the list a few months ago, presumably due to lack of
>> interest.

> Indeed.

> if I would reconsider it, someone would have to show a significant performance boost with the use of something like that.

Since such approach will require dynamic buffer allocation, I think this could improve the memory foot print as well.

Today even if you want to use curl for small data transfer, it will allocate 32K just for upload/download buffers!
When using the multi interface with lots of such connections this might be significant.

I think that 'CURLcode curl_allocate_buffer_cb(char** buff, int* size)' which will be called by curl with the requested buffer size - would be easy to use API for this.

Yehezkel

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