Skip to content

Commit 4b1604d

Browse files
committed
Updated invoker to use a set of written ids
1 parent 87824e8 commit 4b1604d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/scala/scoverage/Invoker.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ object Invoker {
2727
def invoked(id: Int, dataDir: String) = {
2828
// [sam] we can do this simple check to save writing out to a file.
2929
// This won't work across JVMs but since there's no harm in writing out the same id multiple
30-
// times (it just slows things down), anything we can do to help is good.
30+
// times since for coverage we only care about 1 or more, (it just slows things down to
31+
// do it more than once), anything we can do to help is good. This helps especially with code
32+
// that is executed many times quickly, eg tight loops.
3133
if (!invoked.contains(id)) {
3234
// Each thread writes to a separate measurement file, to reduce contention
3335
// and because file appends via FileWriter are not atomic on Windows.

0 commit comments

Comments
 (0)