[html-formfu] Speed of processing

Carl Franks fireartist at gmail.com
Thu Oct 29 21:06:29 GMT 2009


2009/10/29 Octavian Râşniţă <orasnita at gmail.com>:
> Hi,
>
> I've seen that by just adding the attribute "FormConfig" in a subroutine
> declaration in a Catalyst controller that subclasses
> Catalyst::Controller::HTML::FormFu decreases the response speed from 36
> requests to only 5 requests per second, without changing anything else.
>
> I've seen that if I empty the file that holds the form config for that
> subroutine, the speed decreases to only 20 requests per second, which is
> much better, so I assume that a part of this delay is caused by the config
> file parsing.
>
> Is it possible to cache somehow the config files or do something else to
> improve the speed?

Hi,

I'd suggest doing some profiling, as I'd expect the actual building of
the form object to far outway parsing the config file, in terms of
time taken.

Caching of entire form objects would provide a big boost, though I
think they'd have to be cloned each time they're reloaded, in case a
form is unintentionally modified, breaking subsequent calls.
So, of course cloning would have to be profiled, to see if it's much
quicker than building the object form scratch.

Carl



More information about the HTML-FormFu mailing list