I'm using HTML::FormHandler with my mod_perl/Catalyst app to generate a form for my users. It works fine, the only problem is that it slows down page load time by a lot. Here is my subroutine that creates the new form:
sub edit : Chained('base') PathPart Args(0) {
my ( $self, $c ) = @_;
my $form = myapp::Form::Account::Edit->new;
#validation stuff, etc
#...
}
Just adding in the one line "my $form = myapp::Form::Account::Edit->new;
" causes my page load time to go from 50ms up to anywhere from 500-1000ms. I know some people could argue that 500-1000ms page load time for a site is still good, but I'm expecting this site to get high traffic, and right now it's taking that long for a page to load with just one user. I know that HTML::FormHandler is big, as it uses Moose, but after it's loaded once shouldn't it already be loaded? Is there any way I can speed up long this is taking, or is this just the price of using HTML::FormHandler? I'd really like to keep using it if I could, as it makes my life as the coder much easier :)