Subject: | Weird results with Apache/mod-perl/Catalyst |
Hi there,
I'm doing some profiling of a quite big application based on
Apache/mod-perl/Catalyst. In short, I get some very strange times in
correspondence of this statement (see the attached report for details):
[NYTPROF=optimize=0;savesrc=1;use_db_sub=1;clock=4 (MONOTONIC RAW clock)]
17 1 58.6s 58.6s
if (GE::Justice::Data::Clone->is_cloned($class->db_table)) {
(my $clone_class = $class) =~ s/^DM::/DM::Clone::/;
return $clone_class;
}
where db_table() just returns a string and is_cloned() does a regex
match. Somewhat more realistic (?) times (~6-8s) with options
NYTPROF=optimize=0;savesrc=1[;usecputime=1[;clock=0]] (REALTIME)
The funny thing is that this equivalent version "seems" much faster:
17 1 2.85s 2.85s
my $table = $class->db_table;
if (GE::Justice::Data::Clone->is_cloned($table)) {
(my $clone_class = $class) =~ s/^DM::/DM::Clone::/;
return $clone_class;
}
but indeed, according to the logs, no more than ~1s is ever spent in there.
Puzzling: who's right? Am I missing any key configuration parameter?
The same happens on Solaris/Perl 5.8.7, but *not* on a local instance of
the application running via Catalyst::Engine::HTTP (i.e. outside
Apache/mod_perl). So that's possibly an artifact of mod_perl...
Cheers,
Marco
Subject: | prof.report |
Message body not shown because it is not plain text.