[html-formfu] very, very slow initially
Carl Franks
fireartist at gmail.com
Wed Sep 26 18:14:58 GMT 2007
On 26/09/2007, Josef Chladek <josef.chladek at gmail.com> wrote:
> hello list,
>
> I move my catalyst-app from my notebook to our servers, and there are
> two major problems (it's an apache-server with catalyst as fast-cgi):
> the app uses DBIx::Class::HTML::FormFu and my controller uses
> Catalyst::Controller::HTML::FormFu as base.
>
> 1) the first request takes VERY long:
>
> .------------------------------------------+-----------.
> | Action | Time |
> +-------------------------------------------+-----------+
> | /auth/begin | 0.006714s |
> | /auth/login | 9.198848s |
> | -> /auth/show | 9.166110s |
> | /auth/end | 3.985461s |
> | -> Cat::View::TT->process | 3.983828s |
> '-------------------------------------------+-----------'
>
> after that request everything is running fast
>
> .-------------------------------------------+-----------.
> | Action | Time |
> +-------------------------------------------+-----------+
> | /auth/begin | 0.004783s |
> | /auth/login | 0.049029s |
> | -> /auth/show | 0.040471s |
> | /auth/end | 0.117099s |
> | -> Cat::View::TT->process | 0.115839s |
> '-------------------------------------------+-----------'
>
> and I reduced /auth/show to just this
>
> my $row = $c->model('Frontwave::UserDepot')->find($c->user->obj->id);
> $row->fill_formfu_values( $c->stash->{form} );
>
> and view has just [% form %] in it.
>
> nothing more done.
>
> this happens for every fast-cgi child (there are 5), but I can see it
> also when I start the app with the dev-server script/myapp_server -r -
> d on the server
I suggest you try removing the form, but leave in the DBIx::Class find()
I suspect the DBIC class setup is taking up most of that time.
I think the latest Class::C3::XS should help.
To test FormFu, run:
$ prove -l t/04basic.t
t/04basic....ok
All tests successful.
Files=1, Tests=7, 1 wallclock secs ( 1.06 cusr + 0.05 csys = 1.11 CPU)
This test builds and renders 3 separate forms.
This will give you a baseline for the basic FormFu functionality.
> 2) encoding is broken and I have garbled umlauts again (with and
> without the Catalyst::Plugin::Unicode) - I even tried the Test-app (I
> sent yesterday to the list), and the Umlauts don't show up correctly
Sorry, I haven't had a chance to look at your app yet.
I think it's a case of encoding is *still* broken - from your
description, there's definitely something wrong.
Carl
More information about the HTML-FormFu
mailing list