Perl-Critic / Test-Perl-Critic

Run Perl::Critic as a unit test
http://perlcritic.com
Other
9 stars 7 forks source link

Perl::Critic being instantiated for each file is very slow #10

Closed holcapek closed 6 years ago

holcapek commented 6 years ago

Not sure if this is intended or not, but instantiating Perl::Critic for each file to be criticized makes critic_ok pretty slow.

Running perlcritic upon set of files is roughly 4 times faster than Test::Perl::Critic.

Would it be possible to initialize Perl::Critic just once for all files?

Thanks!

holcapek commented 6 years ago

Would something trivial like https://github.com/Perl-Critic/Test-Perl-Critic/pull/11 work? I am not sure of consequences to all_critic_ok as it's using MCE. In case you like the meaning but don't like the look, I can make it look more appealing, of course :-)

petdance commented 6 years ago

Done. It's in the just-pushed-to-CPAN 1.04. Thanks for the nudge.