Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor performance from v1.21 #168

Closed
christopherraa opened this issue Aug 5, 2016 · 2 comments
Closed

Poor performance from v1.21 #168

christopherraa opened this issue Aug 5, 2016 · 2 comments

Comments

@christopherraa
Copy link

christopherraa commented Aug 5, 2016

We run Devel::Cover as part of our automated builds and during the process of upgrading both perl and all our dependencies to newer versions we discovered what might be a regression in Devel::Cover.

Our test-suite, coverage collection and reporting-step in the build-pipeline usually took around 9 minutes while running with Perl v5.14.4 and Devel::Cover v1.15. After upgrading to Perl v5.24.0 and Devel::Cover v1.23 the runtime for the same steps increased to between 45 and 50 minutes. When running on Perl v5.24.0 without Devel::Cover the execution time is as before.

I have run the same tests on all versions of Devel::Cover from v1.15 up to v1.23 and the execution time is fine up until v1.21. Unfortnately I am having a hard time making a minimal test-project that demonstrates this behaviour, but we see it very clearly in out 100+ testfile, ~6K tests codebase.

Any advice on how I can proceed towards giving some actual data that can be looked at?

@christopherraa
Copy link
Author

Did some more digging and found this to be a case of not reading the manual properly for all the modules we updated, specifically the manual for Devel::Cover. My assumption was that the Devel::Cover API was largely unaltered since the tests did run and produce almost the expected coverage-data. It just took forever.

What I notice while digging through the source for Devel::Cover was the change in parameters you pass upon loading the module, namely parameters for which files to select and which files to ignore. In our project we had a makefile that specified this:

HARNESS_DEFAULT=HARNESS_PERL_SWITCHES=-MDevel::Cover=+ignore_re,\.t\$,+ignore_re,^tests,-db,our/cover/db

while the new (and correct) syntax is

HARNESS_DEFAULT=HARNESS_PERL_SWITCHES=-MDevel::Cover=+ignore,\.t\$,+ignore,^tests,-db,our/cover/db

The important bit to note in the documentation is the change from ignore_re and select_re to ignore and select. Both the new and old syntax work, I just thought I'd mention this here in case someone else reads it and think that this is an issue for them. Anyway, on with the story.

It was while looking at the parameters we passed that I realized that this issue was just yet another case of PEBKAC. The executive summary is that in our move to newer Perl we also moved to using local::lib, and in my infinite wisdom I decided to put modules installed through cpanm into a directory called local/, without adding it to Devel::Covers list of ignored paths. As soon as I added +ignore,^local all was well and Devel::Cover did not have to keep track of coverage-data for a lot of extra files (7169 to be specific).

@pjcj Feel free to close this issue and be proud of a great piece of software that works just as intended. I'll go stand in a corner now.

@pjcj
Copy link
Owner

pjcj commented Sep 4, 2017

Thanks very much for your report and subsequent explanation. I'm glad you got everything working and, as you suggest, I am (belatedly) closing the ticket.

@pjcj pjcj closed this as completed Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants