On Dec 7, 2007, at 7:09 AM, Plüm, Rüdiger, VF-Group wrote:



-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED]

Gesendet: Freitag, 7. Dezember 2007 11:24
An: dev@httpd.apache.org
Betreff: Re: Memory consumption of mod_substitute


On Dec 5, 2007 8:36 AM, Plüm, Rüdiger, VF-Group
<[EMAIL PROTECTED]> wrote:
* My test case 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 the 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.

Ha!  Is there a way we could be more aggressive in minimizing the
number of buckets mod_substitute creates?  Perhaps using
apr_bucket_copy to create ref-counted versions of the replacement
string?

Possibly in the strmatch case, but in the regexp case the replacement
string can be different each time when you use backreferences.
Yes, there maybe some optimization potential left here, but this might
become tricky with the temporary pools I introduced.

Yeppers... plus it makes the code itself much more
tricky with nasty paths :)

Reply via email to