httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe Jr." <wr...@rowe-clan.net>
Subject Re: svn commit: r1161661 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Date Fri, 26 Aug 2011 16:25:26 GMT
On 8/26/2011 7:03 AM, "Plüm, Rüdiger, VF-Group" wrote:
>  
>> From: Jim Jagielski [mailto:jim@jaguNET.com] 
>> Sent: Freitag, 26. August 2011 13:49
>>
>> My plan is to put each range into an array and at the
>> end flatten it via apr_array_pstrcat()
> 
> I thought about that as well, but I think a combination of a preallocated
> buffer and apr_snprintf using a moving pointer in this buffer could
> save even more memory in the typical use case.
> Of course this changes if you remove a lot of ranges by merging.

But the "wasted" memory is insignificant compared to the CPU saved by
not resizing the buffers, IMHO

Yet another example where we need apr_prealloc :)

Mime
View raw message