httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: Flattening and Bucket Creation
Date Mon, 14 May 2007 19:59:00 GMT
On Mon, 14 May 2007 14:33:18 -0400
Mark Zetts <> wrote:

>    I plan to use apr_brigade_pflatten(), but it's my understanding
> that after processing the entity body, I will have to call 
> apr_bucket_pool_create() to re-bucketize the data

Yes.  But that shouldn't be a bottleneck.  All it does is to
turn a chunk of memory into a bucket.

>	 then re-insert the 
> brigade.  Some of the entity bodies processed by the filter may be
> large and I want understand how the data is re-chunked for the bucket
> brigade.

How large?  If you could be getting huge amounts in a single brigade,
you might want to pass it down the chain in smaller chunks (that
applies if you have buckets that morph, and only get loaded into 
memory when you read them).

>   By the way, I purchased your book.  I read chapters 2, 3 and 8
> before going to bed and wrote my output filter the next day.


>	  I've
> had no problems with the filter, but there are test cases it will
> fail unless I process the body as flattened data.   Your book reads
> well.

Thank you.  I hope you found the second example in Chapter 8 relevant:-)

Nick Kew

Application Development with Apache - the Apache Modules Book

View raw message