[Catalyst] DProf

Octavian Rasnita orasnita at gmail.com
Fri Nov 2 18:59:48 GMT 2007


Hi,

I have tried to see which of the modules of my Catalyst application take so 
much time, because at certain moments the processor is occupied 99.9%, then 
goes down to 12%, then again at 99.9% and so on.

I've used the module Apache::DProf in httpd.conf, and the results are below, 
but I don't know what can I do to solve the problem and to make the 
application consume less processor time.

The processor of the machine is an Intel Core 2 Duo at 2.4 GHz, and the 
computer has 8 GB of RAM, and the application isn't very big. It has just 
130 templates and 21 controller modules that have aproximately 400 KB.

It worked fine until I added Catalyst::Plugin::I18N and I've translated the 
interface into 3 languages, but I don't know if this is the cause, or how 
could I solve it in other way if I still want to have the interface in more 
languages.

Isn't Catalyst able to handle big applications? Or what could I be doing 
wrong?

Thank you. Here is the DProf result:

[root at octavian 24621]# dprofpp
Template::Document::__ANON__ has 1 unstacked calls in outer
Template::Context::include has 1 unstacked calls in outer
Catalyst::__ANON__ has 1 unstacked calls in outer
Template::Stash::XS::get has 1 unstacked calls in outer
Garbled profile is missing some exit time stamps:
Catalyst::__ANON__
Template::Context::include
Template::Stash::XS::get
Template::Document::__ANON__
Try rerunning dprofpp with -F.

[root at octavian 24621]# dprofpp -F
Catalyst::__ANON__ has 1 unstacked calls in outer
APR::Table::FIRSTKEY has 1 unstacked calls in outer
Faking 2 exit timestamp(s).

Total Elapsed Time = -1.23365 Seconds
  User+System Time =        0 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 0.00   22.02 57.132    478   0.0461 0.1195  Catalyst::__ANON__
 0.00   20.27 20.287  10229   0.0020 0.0020 
Class::Accessor::Grouped::__ANON__
 0.00   4.384  4.384  25875   0.0002 0.0002 
Catalyst::Plugin::I18N::localize
 0.00   4.319  4.319   1431   0.0030 0.0030  Catalyst::Request::uri_with
 0.00   1.827 33.535 166718   0.0000 0.0002  Template::Stash::XS::get
 0.00   1.079  7.232  25875   0.0000 0.0003  Template::Document::__ANON__
 0.00   0.798  6.918   1913   0.0004 0.0036  Template::Context::include
 0.00   0.744  0.744  25875   0.0000 0.0000  Template::Context::localise
 0.00   0.499  0.499    926   0.0005 0.0005 
Catalyst::Plugin::Authorization::R
                                             oles::check_any_user_role
 0.00   0.245  0.245   4772   0.0001 0.0001  Path::Class::Dir::stringify
 0.00   0.210  0.210    463   0.0005 0.0005 
Catalyst::Plugin::Authentication::
                                             user_exists
 0.00   0.154  0.154  25875   0.0000 0.0000  Template::Context::delocalise
 0.00   0.087  0.087   3291   0.0000 0.0000  Template::Iterator::get_next
 0.00   0.083  0.083  16683   0.0000 0.0000  Catalyst::Action::__ANON__
 0.00   0.077  0.077   2785   0.0000 0.0000  Template::Config::iterator


Octavian




More information about the Catalyst mailing list