Skip to content

Conversation

@RichardBradley
Copy link
Contributor

This patch uses ThreadLocals to avoid re-opening the coverage file on each executed statement.
"flush()" is used so that the coverage file is still always up-to-date, even if the instrumented JVM is abruptly killed.

On my windows machine, this took a sbt clean scoverage:test from 10m52 to 6m20 and a sbt scoverage:test with no clean (after a previous scoverage run) from 8m36 to 3m22. I think these numbers may overstate the benefit of this change (the length of the runs stops me from doing enough runs to get a good sized sample), but I do think this helps a lot with performance.

sksamuel added a commit that referenced this pull request May 15, 2014
Don't reopen the coverage file each time; on windows that is very slow.
@sksamuel sksamuel merged commit f973b22 into scoverage:master May 15, 2014
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