On 24/08/07, Tobias Kremer <[EMAIL PROTECTED]> wrote:
> While tracking down some memory leaks I realized that all forms utilizing the
> new Date element are leaking some memory - at least while running under
> Catalyst (FCGI). I'm measuring this with top and ab and I can see an endless,
> constant growth in memory usage for all pages that use forms with the Date
> element (after 500 requests the memory usage of the Catalyst FastCGI process
> grows from 47megs to 50 megs). I'm using the latest CPAN release 0.01003.

Have you confirmed that the process size only grows if Date elements are used?

The only thing I can see in Date.pm that might cause problems is
get_fields() which unshifts $self to the list it returns.
However, I've run a simple test script which creates a form with a
Date field, then in a loop submits valid data with process(), then
checks valid_and_submitted() - 600 times - but haven't seen any memory
usage increase.

The Catalyst FormFu controller itself shoudn't leak memory, as it
weakens the ref it makes to the cat context.

Are you using auto_inflate(1)?
Does the Date have any other constraints, filters, etc?
What methods are you calling on the form / date field?

Cheers,
Carl

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to