Yes. All the examples were helpful. What I meant to ask was, if I flatten a brigade (apr_brigade_pflatten) of 5 buckets, 4K bytes each, can I then call apr_bucket_pool_create() passing in the whole buffer or do I need to chunk the buffered data?
Nick Kew <[EMAIL PROTECTED]> 05/14/2007 03:59 PM Please respond to [email protected] To [email protected] cc Subject Re: Flattening and Bucket Creation On Mon, 14 May 2007 14:33:18 -0400 Mark Zetts <[EMAIL PROTECTED]> 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 http://www.apachetutor.org/
