erabus has asked for the wisdom of the Perl Monks concerning the following question:
I have about ten routines that are common to a number of classes. These routines are kept in a package called Func. After profiling an application with DProf, I was surprised to find that most of the time is being spent in the BEGIN section of Func.
Here is the output from the profiler:
Here is the top of the Func module:Total Elapsed Time = -36.6621 Seconds User+System Time = 86.44528 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 28.4 24.62 28.883 738874 0.0000 0.0000 SE::Util::Func::BEGIN
Why is perl spending so much time in the BEGIN section of Func? Thanks.package SE::Util::Func; use Exporter; @ISA = ('Exporter'); @EXPORT= qw( SE_cat SE_dump SE_getName SE_getValue SE_isTag SE_matchN +ame SE_matchNamePattern SE_prog SE_trim ); require 5.6.1; use strict;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Why is perl spending so much time in the BEGIN section?
by chromatic (Archbishop) on Jun 08, 2002 at 21:50 UTC | |
Re: Why is perl spending so much time in the BEGIN section?
by Anonymous Monk on Jun 08, 2002 at 20:43 UTC |
Back to
Seekers of Perl Wisdom