stas 2002/11/24 00:52:38 Modified: src/docs/2.0/user/handlers filters.pod Log: start covering missing important topics Revision Changes Path 1.8 +33 -0 modperl-docs/src/docs/2.0/user/handlers/filters.pod Index: filters.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/handlers/filters.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- filters.pod 20 Nov 2002 00:52:18 -0000 1.7 +++ filters.pod 24 Nov 2002 08:52:38 -0000 1.8 @@ -1042,9 +1042,42 @@ +=head1 Writing Well-Behaving Filters +META: to be written. +[ +talk about issues like not losing metabuckets. e.g. if the filter runs +a switch statement and propogates buckets types that were known at the +time of writing, it may drop buckets of new types which may be added +later, so it's important to ensure that there is a default cause where +the bucket is passed as is. + +of course mention the fact where things like EOS buckets must be +passed, or the whole chain will be broken. Or if some filter decides +to inject an EOS bucket by itself, it should probably consume and +destroy the rest of the incoming bb. need to check on this issue. + +] + +=head1 Writing Efficient Filters + +META: to be written + +[ + +Bucket Brigades are used to make the data flow between filters and +handlers more efficient. e.g. a file handle can be put in a bucket and +the read from the file can be postponed to the very moment when the +data is sent to the client, thus saving a lot of memory and CPU +cycles. though filters writers should be aware that if they call +$bucket->read(), or any other operation that internally forces the +bucket to read the information into the memory (like the length() op) +and thus making the data handling inefficient. therefore a care should +be taken so not to read the data in, unless it's really necessary. + +] =head1 Maintainers
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]