httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plüm, Rüdiger, VF-Group <ruediger.pl...@vodafone.com>
Subject Re: Memory consumption of mod_substitute
Date Fri, 07 Dec 2007 12:09:17 GMT


> -----Ursprüngliche Nachricht-----
> Von: justin.erenkrantz@gmail.com 
> 
> 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
> <ruediger.pluem@vodafone.com> 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.

> 
> > Comments, thoughts?
> 
> Your patch looks good on a quick cursory review.  -- justin

Thanks for reviewing.

Regards

Rüdiger


Mime
View raw message