Skip to content

Use set instead of list for arcs_executed, fixes poor performance#1901

Merged
nedbat merged 2 commits intocoveragepy:masterfrom
turibe:tu-performance-report-arcs
Dec 4, 2024
Merged

Use set instead of list for arcs_executed, fixes poor performance#1901
nedbat merged 2 commits intocoveragepy:masterfrom
turibe:tu-performance-report-arcs

Conversation

@turibe
Copy link
Contributor

@turibe turibe commented Dec 3, 2024

This fixes very poor performance in "coverage.xml" for a large-ish code base, which I traced to the arcs_missing procedure. (Could probably improve further using set difference.)

@nedbat
Copy link
Member

nedbat commented Dec 3, 2024

Nice, thanks! Do you have any stats on the size of the repo and the speed up?

@nedbat nedbat merged commit 346cfc0 into coveragepy:master Dec 4, 2024
nedbat added a commit that referenced this pull request Dec 4, 2024
@turibe
Copy link
Contributor Author

turibe commented Dec 4, 2024

Nice, thanks! Do you have any stats on the size of the repo and the speed up?

Speedup went from 730 seconds ("cant-wait-that-long-will-do-control-C"), to 13 seconds, for coverage xml.

@nedbat
Copy link
Member

nedbat commented Dec 6, 2024

This is now released as part of coverage 7.6.9.

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

Successfully merging this pull request may close these issues.

2 participants