Re: Optimize my script



Thanks Paul, I should profile of course, should have thought about that.

I tried the below, but it's not quite clear what this means to me.
When I run with "./analyze.pl foo bar" the execution time is fast, so the
problem is not starting up/exiting of Perl, and I conclude it must be
inside the script somwhere.

DirHandle::BEGIN takes only 0.01 seconds, so that's not it either.
I don't see the regular expressions anywhere, unfortunately.
Is there a way to change that?

Thanks

$ perl -d:DProf ./analyze.pl traplas-example output
....
$ dprofpp
Total Elapsed Time = 1.109888 Seconds
User+System Time = 1.039888 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
0.96 0.010 0.010 2 0.0050 0.0050 DirHandle::BEGIN
0.00 - -0.000 1 - - DirHandle::DESTROY
0.00 - -0.000 1 - - strict::bits
0.00 - -0.000 1 - - strict::import
0.00 - -0.000 1 - - Symbol::BEGIN
0.00 - -0.000 1 - - Symbol::gensym
0.00 - -0.000 1 - - DirHandle::read
0.00 - -0.000 1 - - DirHandle::open
0.00 - -0.000 2 - - Exporter::import
0.00 - -0.000 1 - - DirHandle::new
0.00 - 0.010 2 - 0.0050 main::BEGIN

.



Relevant Pages

  • Re: Help with Profiles
    ... "Paul" wrote in message ... Set the permissions on the share to Full Control to all users that will ... You will not have to create the users profile directories, ... > See Mastering Windows Server 2003 by Mark Minasi. ...
    (microsoft.public.windows.server.general)
  • Re: Search for multiple words
    ... titoto Wrote: ... > In any given cell will contain 1 of the words needed. ... > = PAUL ...
    (microsoft.public.excel.misc)
  • Re: Frontpage2003 Dating Agency
    ... Cross-posting is bad Netiquette, Paul. ... > his/her profile, and upload a profile pic, search profiles, drop a note to ... recommend a tutorial I could use. ... can somebody recommend a web package or web site that may be of ...
    (microsoft.public.frontpage.programming)
  • Re: [SLE] Saving Konq view profile for /smb, etc.
    ... On Wednesday 10 November 2004 5:16 pm, Andreas Philipp wrote: ... >> as I might have expected, since switching the view profile to ... >> filemanagement in fact gives me the detail view I want. ... Paul ...
    (SuSE)