Since I saw no one replied to my question yet, i will try to Clarify my question due to some research I've done.
The Following 2 lines are the most significant in the overall performance of the script:
31.0 7.779 8.585 10715 0.0007 0.0008 Text::Balanced::_match_quotelike
30.4 7.641 10.213 10967 0.0007 0.0009 Text::Balanced::_match_variable
From what I've found, "match_quotelike " means that Perl deciphers all the quotes (double, single... ) before running the script.
And there is a LOT of those in my script (it's kind of an interactive program with heaps of menus and printouts).
So My Question is, is there any way around this? , like telling Perl to only decipher part of it (on - demand, condition for e.g.) ?
P.S I think the "match_variable" is probably the same, but only for Variables.
Thank you.
Eyal Edri,
System Engineer,
Avaya Communications.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
bill luebkert wrote:
I've run the Profiling using: perl -d:Dprof myprog.pl and then: dprofpp tmon.out
I got this results:
dprofpp tmon.out
Exporter::Heavy::heavy_export_ok_tags has 1 unstacked calls in outer
File::Glob::GLOB_QUOTE has 1 unstacked calls in outer
Exporter::export_ok_tags has -1 unstacked calls in outer
File::Glob::GLOB_ALPHASORT has 1 unstacked calls in outer
File::Glob::GLOB_TILDE has 1 unstacked calls in outer
File::Glob::GLOB_BRACE has 1 unstacked calls in outer
Exporter::export has -6 unstacked calls in outer
File::Glob::GLOB_NOMAGIC has 1 unstacked calls in outer
File::Glob::AUTOLOAD has -5 unstacked calls in outer
Exporter::Heavy::heavy_export has 6 unstacked calls in outer
Total Elapsed Time = 33.18645 Seconds
User+System Time = 25.06645 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
31.0 7.779 8.585 10715 0.0007 0.0008 Text::Balanced::_match_quotelike
30.4 7.641 10.213 10967 0.0007 0.0009 Text::Balanced::_match_variable
21.1 5.288 25.133 126 0.0420 0.1995 Switch::filter_blocks
11.8 2.971 5.860 3916 0.0008 0.0015 Text::Balanced::_match_codeblock
4.48 1.123 1.123 22722 0.0000 0.0000 Text::Balanced::_failmsg
1.07 0.269 0.269 62 0.0043 0.0043 Text::Balanced::_match_bracketed
0.79 0.199 0.901 9 0.0222 0.1001 main::BEGIN
0.76 0.190 0.367 9 0.0211 0.0408 Spreadsheet::WriteExcel::Workbook:
:BEGIN
0.32 0.080 0.099 10 0.0080 0.0099 Spreadsheet::WriteExcel::Worksheet
::BEGIN
0.32 0.079 0.157 9 0.0088 0.0175 Switch::BEGIN
0.28 0.070 0.437 4 0.0175 0.1092 Spreadsheet::WriteExcel::BEGIN
0.20 0.049 0.068 1 0.0493 0.0677 Config::IniFiles::ReadConfig
0.20 0.049 0.049 124 0.0004 0.0004 Switch::line
0.18 0.046 0.046 376 0.0001 0.0001 Config::IniFiles::_section::FETCH
0.12 0.030 0.039 5 0.0060 0.0079 IO::Seekable::BEGIN
I can clearly see that something to do with the module "Text:Balanced" is causing the delay.
Any idea what this module is and how it can be related to performace?
P.S: i've upgraded Module Switch.pm which trigged Upgrading Filer & Text:Balanced upgrades as well.
You can add more instances of the line above through your code and
see where any large delays are. Or you could check out profiling
your code with -D:Dprof switch and run .../perl/bin/dprofpp.bat to
see results.
I've run the Profiling using: perl -d:Dprof myprog.pl and then: dprofpp tmon.out
I got this results:
dprofpp tmon.out
Exporter::Heavy::heavy_export_ok_tags has 1 unstacked calls in outer
File::Glob::GLOB_QUOTE has 1 unstacked calls in outer
Exporter::export_ok_tags has -1 unstacked calls in outer
File::Glob::GLOB_ALPHASORT has 1 unstacked calls in outer
File::Glob::GLOB_TILDE has 1 unstacked calls in outer
File::Glob::GLOB_BRACE has 1 unstacked calls in outer
Exporter::export has -6 unstacked calls in outer
File::Glob::GLOB_NOMAGIC has 1 unstacked calls in outer
File::Glob::AUTOLOAD has -5 unstacked calls in outer
Exporter::Heavy::heavy_export has 6 unstacked calls in outer
Total Elapsed Time = 33.18645 Seconds
User+System Time = 25.06645 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
31.0 7.779 8.585 10715 0.0007 0.0008 Text::Balanced::_match_quotelike
30.4 7.641 10.213 10967 0.0007 0.0009 Text::Balanced::_match_variable
21.1 5.288 25.133 126 0.0420 0.1995 Switch::filter_blocks
11.8 2.971 5.860 3916 0.0008 0.0015 Text::Balanced::_match_codeblock
4.48 1.123 1.123 22722 0.0000 0.0000 Text::Balanced::_failmsg
1.07 0.269 0.269 62 0.0043 0.0043 Text::Balanced::_match_bracketed
0.79 0.199 0.901 9 0.0222 0.1001 main::BEGIN
0.76 0.190 0.367 9 0.0211 0.0408 Spreadsheet::WriteExcel::Workbook:
:BEGIN
0.32 0.080 0.099 10 0.0080 0.0099 Spreadsheet::WriteExcel::Worksheet
::BEGIN
0.32 0.079 0.157 9 0.0088 0.0175 Switch::BEGIN
0.28 0.070 0.437 4 0.0175 0.1092 Spreadsheet::WriteExcel::BEGIN
0.20 0.049 0.068 1 0.0493 0.0677 Config::IniFiles::ReadConfig
0.20 0.049 0.049 124 0.0004 0.0004 Switch::line
0.18 0.046 0.046 376 0.0001 0.0001 Config::IniFiles::_section::FETCH
0.12 0.030 0.039 5 0.0060 0.0079 IO::Seekable::BEGIN
Any idea what this module is and how it can be related to performace?
This cut a few seconds from loading time, but really not a significant improve.
thanks.
_______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs