in reply to Finding bottlenecks in the code
Thanks to BrowserUk's guidance, I got valuable mileage out of Devel::SmallProf. Fiddling around with various options, then going through the output, I have narrowed down the problem to Text::Balanced (see the top 8 worst perf hits below).
Text/Balanced.pm count wall tm cpu time line 47236 14.17731 13.93000 921: if (ref($func) eq 'CODE') 21983 7.933862 7.570000 952: if ($$textref =~ /\G(.)/gcs) 47236 1.307192 3.120000 918: $func = $func[$i]; 47236 1.252747 3.180000 930: if (defined($field) && length($field +)) 47236 1.168986 2.850000 919: $class = $class[$i]; 47236 1.068727 3.260000 920: $lastpos = pos $$textref; 47236 1.064919 3.290000 929: $pref ||= ""; 25253 1.048240 2.080000 915: foreach my $i ( 0..$#func )
Since I didn't directly call this module in use, obviously I am doing something that is calling its services. The modules I am using are --
More guidance welcome. Where I am bringing in T::B? What can I do to avoid it, or to speed it.
Many thanks to everyone thus far.
|
|---|