On 1/31/07, Victor Igumnov <[EMAIL PROTECTED]> wrote:
To see the impact of the memory leak. Run broken.pl first which will run formbuilder against your installed version. It will create a new formbuilder instance over and over, watch top -o size as it grows to 100-200 megs in just a few seconds. Now run fixed.pl - works great don't it? No memory leaks what so ever. I have also included a CatTest catalyst project which uses C::C::FormBuilder. With everything patched up the process stays at ~14 megs while being hammered by ab -n 900 -c 100 http://localhost:3000/. So the question is am I the only one using formbuilder? This leak was very obvious. All tests pass for both projects. http://temp.fabulously40.com/~victori/CGI-FormBuilder-3.05-memfix.tbz -victor
Thank you Victor for pointing out the memory leak. I've attached your diff files here to make it easier on folks. After looking at it, I think your patch is just a workaround for the circular references in CGI::FormBuilder and fixing these problems directly instead of cloning references is a better approach. I have submitted a bug report to Nate at http://rt.cpan.org/Ticket/Display.html?id=24696 and he has already said he would look into it. Juan
memfix-for-c-c-formbuilder.diff
Description: Binary data
memleakfix-for-cgi-formbuilder.diff
Description: Binary data
_______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/