#calls to main::BEGIN = 6 with -d:DProf

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


     I'm trying to optimize a cgi script and using -d:DProf for

C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin>c:\Perl
\bin\dprofpp.bat tmon.out
Total Elapsed Time = 0.279350 Seconds
  User+System Time = 0.264350 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 41.6   0.110  0.248      6   0.0183 0.0414  main::BEGIN
 12.1   0.032  0.032      6   0.0053 0.0053  ActiveState::Path::BEGIN

     Could you tell me why #Calls to main::BEGIN increases as I
include more and more modules.

Thank You,

test.cgi :-

#!/usr/bin/perl -d:DProf

use strict;
use CGI;
use DBI;
use Digest::SHA;
use File::Basename;

Re: #calls to main::BEGIN = 6 with -d:DProf

On Fri, 1 Jan 2010 00:41:04 -0800 (PST) in comp.lang.perl.misc,
Quoted text here. Click to load it

Could it be because use module translates to something resembling
BEGIN { require module; }

Site Timeline