I am currently doing some performance tuning and have a question regarding the output of Dprofpp. I am seeing that the majority of time (40% or more) is being taken up with many thousands of calls to main::BEGIN.
The typical output that I'm getting looks like this:
> dprofpp Total Elapsed Time = -51.0824 Seconds User+System Time = 310.7123 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 44.8 139.2 114.05 843865 0.0000 0.0000 main::BEGIN 31.3 97.53 97.452 36407 0.0027 0.0027 DBI::st::execute 22.4 69.62 183.55 4 17.405 45.889 main::ScanBuffer Snip...
I had a super search and a look on CPAN. I found the following useful:
One further thing that might be useful are the modules that I'm using:
use strict; use DBI qw(:sql_types); use Data::Dumper;
... I mention this as I think the BEGIN block is called by AUTOLOADER when use-ing modules but I'm afraid that I'm not very clear on the details. One thought that I had was that Dprof was counting the BEGIN blocks in the imported modules but not labelling them correctly in the output. Plausible or not?
Regards,
Dom.
In reply to Dprof and main::BEGIN by dbush
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |