Hi Carl,

From: "Carl Franks" <fireart...@gmail.com>
2009/10/29 Octavian Râşniţă <orasn...@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


You are probably right. I don't think I understand very well why the form should be cloned, but maybe we could choose which of the forms need to be cached, and we could choose to cache only those forms that couldn't be modified, so they shouldn't be cloned. This way the caching of entire forms could be done probably easier at least for those cases of forms that don't need to be cloned.

Unfortunately this is a very big issue because the speed decrease is very high and if a page uses a form made with HTML::FormFu it becomes unimportant if other parts of the page do caching, or if we use database query improvements.

Thanks.

Octavian


_______________________________________________
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