note
Athanasius
<p>Hello [Rita_G], and welcome to the Monastery!</p>
<p>Here is some good advice from the <i>Camel Book</i> (4<sup>th</sup> edition, p. 696):</p>
<blockquote>
<i>Avoid unnecessary syscalls. ... Avoid unnecessary <tt>system</tt> calls. ... Worry about starting subprocesses, but only if they’re frequent.</i>
</blockquote>
<p>The performance problems you are seeing almost certainly derive from the frequent use of backticks in your script. Each such use incurs an additional overhead.</p>
<p>The good news is that all the backtick operations in your script can be replaced with pure Perl. See [doc://grep], [doc://File::Basename], and the substitution operator <tt>s///</tt> in [doc://perlop#Regexp-Quote-Like-Operators] and [doc://perlre].</p>
<p>Don’t even think about multithreading until you’ve re-implemented your script in pure Perl and benchmarked the results!</p>
<p>Hope that helps,</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-968231">
<p>Athanasius <font color=#008000><°(((><</font> <i>contra mundum</i></p>
</div></div>
1002822
1002822