perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject Re: libapreq's multipart_buffer stuff
Date Wed, 01 Mar 2000 07:38:38 GMT
On Thu, 24 Feb 2000, Jim Winstead wrote:

> Is it just me, or is it pretty dodgy code? It allocates memory like
> its going out of style (it doesn't appear to reuse any of the
> buffers it allocates from the pool), resulting in server processes
> that balloon up to five times the uploaded file's size. Its also
> appears to be flat-out slow because of all the extra work it is
> doing.

it's pretty dodgy code :)  the multipart buffer code in libapreq is
actually just a translation from's Perl code to C.  notice the
comment: /*XXX: we can optimize this loop*/ 
meaning, I'm aware it's not reusing the buffer, but it's using a subpool
which is cleared at the end of multipart_buffer_fill, each call to that
should be no more than 4k or so.  I have a recent mail (not to the list)
from somebody who experienced the balloon, looked into it, and thinks that
ap_clear_pool() is not working.  anyhow, my plan is to get 1.22 out, then
revisit libapreq, then onto modperl-2.0

View raw message