Ryan Bloom wrote:

>On Monday 26 November 2001 09:39 am, Brian Pane wrote:
>
>>Ryan Bloom wrote:
>>
>>>On Monday 26 November 2001 09:28 am, Brian Pane wrote:
>>>
>>[...]
>>
>>>>* If we end up in the concatenation again during the foreach loop
>>>> through the brigade, add the small buckets to the end of the
>>>> previously allocated heap bucket.  If the heap bucket size is
>>>> about to exceed 8KB, stop.
>>>>
>>>This should be done by moving the first bucket into a separate brigade
>>>and using the brigade_write functions again.
>>>
>>Thanks for the pointer; using apr_brigade_write for this will make the
>>code a lot cleaner.  I'll implement this later today if nobody beats
>>me to it.
>>
>
>That is what is being done now.
>

But in the current implemention, we end up allocating new space
each time the buckets are compacted, because we start with an
empty brigade, right?  So even if the first bucket in the list
to be compacted happens to have been created by a previous
apr_brigade_write (because we end up compacting twice on the
same request, due to a long stream of small buckets produced by
a CGI or mod_include), we can't take advantage of the extra space
within that bucket.  Or am I missing something?

--Brian





Reply via email to