<?xml version="1.0" encoding="windows-1252"?>
<node id="949835" title="Re: perlcritic speedup" created="2012-01-25 01:16:46" updated="2012-01-25 01:16:46">
<type id="11">
note</type>
<author id="458049">
jthalhammer</author>
<data>
<field name="doctext">
&lt;p&gt;Perl::Critic has been through several rounds of optimizations, so I doubt you'll be able to squeeze much more performance out of it (but patches are always welcome).&lt;/p&gt;

&lt;p&gt;Most of the time is spent within PPI, parsing the file.  So running a client/server arrangement won't help much.  However,  installing [cpan://PPI::XS] will give you a small speedup.&lt;/p&gt;

&lt;p&gt;Tuning your policy set might help some.  Certain polices like like RequireTidyCode are considerably more intensive than others.  Also, any policy that has 'PPI::Document' or 'PPI::Token::Word' in the applies_to method tends to be slower than other policies that have a more narrow focus.  So if you can disable those policies (or just run them less often), then you might get a little better results.&lt;/p&gt;

&lt;p&gt;Editors like Komodo run Perl::Critic in the background as you edit the file, so you don't notice the performance as much.  Perhaps you could get vim to do the same?&lt;/p&gt;

&lt;p&gt;Never mind folks that tell you when to save your files or how often to critique or syntax-check your code.  Everyone has a different workflow.  Do whatever works best for you.&lt;/p&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-458049"&gt;
&lt;p&gt;
Jeffrey Thalhammer&lt;br/&gt;
&lt;a href="http://www.imaginative-software.com"&gt;Imaginative Software Systems&lt;/a&gt;&lt;br/&gt;
&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
949688</field>
<field name="parent_node">
949688</field>
</data>
</node>
