]> granicus.if.org Git - apache/commit
* Optimize memory behaviour of mod_substitute by
authorRuediger Pluem <rpluem@apache.org>
Sat, 8 Dec 2007 14:03:43 +0000 (14:03 +0000)
committerRuediger Pluem <rpluem@apache.org>
Sat, 8 Dec 2007 14:03:43 +0000 (14:03 +0000)
commit8c36c1f87744f5c546d54ab0f1acddfbf9bcae73
treecef2fe58f0136bb53761f3ee13666a0e8d5295d8
parent2e30b4917e656cdb262ec2bf46ba4a0345e9d6ff
* Optimize memory behaviour of mod_substitute by

  * Precreate all needed brigades, save them in the filter context and reuse
    them in order to avoid frequent recreations using the request pool.

  * Use a temporary pool for all the needed copy stuff and clean it up every
    time we passed the passbb brigade down the chain. We can pass the
    brigade down the chain directly after we processed one bucket from the
    original brigade as buffering is done by the network filters.

  * Use transient instead of pool buckets.

  * There are cases that lead to the exceptional situation of a very large
    passbb bucket brigade (about 1,000,000 buckets) as a result of processing
    4 MB of a file. So I add a flush bucket once I have more than
    MAX_BUCKET (1000) buckets in the brigade and pass it down the chain to get
    it send and the passbb bucket brigade cleaned up and its memory reusable
    again.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@602469 13f79535-47bb-0310-9956-ffa450edef68
modules/filters/mod_substitute.c