Am 26.09.2007 um 19:14 schrieb Carl Franks:
On 26/09/2007, Josef Chladek <[EMAIL PROTECTED]> 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.
I am using a lot of DBIC models/schemas, had the C3::XS stuff
installed before (on my notebook I even use perl 5.9.5 which is
really fast in loading all the classes). I tried to debug further and
reduced my show to the following
sub show : Local : FormConfig('auth/show.yml') {
my ( $self, $c ) = @_;
}
without ANY dbic call it takes as long as described above, if I
remove the
: Local : FormConfig('auth/show.yml')
it runs immediately.
all my other controllers run with no delay after startup, what
happens when FormConfig is executed? I even removed the
__PACKAGE__->load_components(qw/HTML::FormFu .../);
part from my DBICs - no change, still it takes so long...
my show.yml was reduced to '---', still no change.
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.
well I was too fast, the Test-app works with utf8 (execpt that error
messages are iso as described yesterday). I'll look deeper in my
Catalyst app (and all the plugins) to describe the behaviour better...
thanks
josef
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu