Dave Rolsky wrote:
> 
> I'm fairly sure, FWIW, that Mason does not have any memory leaks, as of
> 1.12.  Pre-1.10 versions do have a _very_ slow memory leak, and 1.10 and
> 1.11 had that leak plus another, much nastier one.
> 

Yes, Mason seemed pretty free of leaks when I tested it more today too.

> Also FWIW, running Joshua's tests on my machine uniformly used about 1/3
> to 1/4 as much RAM, with Mason, Template Toolkit and Apache::ASP.  I too
> am running GNU/Linux, with a 2.4 kernel, on i386 hardware.  The only
> difference in software was that I have Perl 5.8.0 installed, but I'd be
> incredibly shocked if that explained the difference.
> 

This is interesting.  I should look into upgrading to perl 5.8 on
these tests & see what difference there may be.

You might also see if it makes a difference if you run the tests for
a long enough time.  I run them at least 60 seconds for these benchmarks
which may make a difference.

> I'm actually pretty comfortable with Mason's memory usage because I think
> that certain features it offers explain its memory use.  Basically, any
> framework that offers filtering features on generated output will need to
> store the entire output in memory before sending it, and I suspect this is
> one thing I think has a big impact on Mason's memory usage.
> 

Yep, especially with how perl can store internal data structures
relatively inefficiently, where 20K of data represented internally
can easily bloat up to 100K internally depending on how its being stored,
and matters are probably made worse by code & data being intermingled
so dirtying the data dirties the code pages to to become unshared.

I think that is how Gerald achieves his low memory footprints generally
in Embperl, since he is doing most of his stuff in C it seems, and still
offering all the advanced features we have in the other application frameworks.

Regards,

Josh

Reply via email to