[Catalyst] The performance test of 6 leading frameworks
Jonathan Rockway
jon at jrock.us
Fri Feb 29 22:03:12 GMT 2008
* On Fri, Feb 29 2008, Dab wrote:
> Thank you for your answers
> If asked that question is that I make a small application that takes 3
> seconds per request with only one user. It has only 7 tables and uses
> a lot of TT.
> I forget to use /Template::Stash::XS, (thank /Andy) I will make a comparison
Rather than guessing, just fire up the profiler (Devel::DProf) and see
what's taking a long time. Then you can speed that part up.
I usually do this:
in Controller::Root:
sub quit :Local { exit(0) if $ENV{MYAPP_EXIT_OK} }
Then:
$ MYAPP_EXIT_OK=1 perl -Ilib -d:DProf script/myapp_server.pl
$ ab -n 1000 http://localhost:3000/slow/page
$ GET http://localhost:3000/quit
$ dprofpp
<listing of slow routines>
An improvement would be to just add this to your Makefile.PL:
sub MY::postamble {
return <<"EOM";
profile:
\tMYAPP_EXIT_OK=1 perl -Ilib -d:DProf script/myapp_server.pl
\tab -n 1000 http://localhost:3000/slow/page
\tGET http://localhost:3000/quit
\tdprofpp
\trm tmon.out # if you want
EOM
}
Then "make profile". Untested.
Regards,
Jonathan Rockway
More information about the Catalyst
mailing list