in reply to perlcritic speedup
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).
Most of the time is spent within PPI, parsing the file. So running a client/server arrangement won't help much. However, installing PPI::XS will give you a small speedup.
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.
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?
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.
Jeffrey Thalhammer
Imaginative Software Systems
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perlcritic speedup
by powerman (Friar) on Jan 25, 2012 at 08:24 UTC | |
by jthalhammer (Friar) on Jan 25, 2012 at 09:25 UTC | |
by powerman (Friar) on Jan 25, 2012 at 09:53 UTC | |
by jthalhammer (Friar) on Jan 25, 2012 at 10:09 UTC | |
by powerman (Friar) on Jan 25, 2012 at 10:29 UTC |