Bottleneck in cover:reset/0

Hans Svensson <[email protected]> Mon, 18 Aug 2014 10:43:15 +0200
Newsgroups gmane.comp.lang.erlang.patches
Message-ID <[email protected]>
We observed that our test suite was spending significant time (~10s) 
resetting cover - The issue was that to avoid building "long lists"
reset was done on a per-clause basis, where each reset contained a call 
to ets:match_object.

It should be a safe optimization to assume that the list of 
clauses/lines fits in memory. (If that is not the case reset/0 will 
hardly be the main problem!)

While covering ~30 medium sized modules (~50 clauses per module) this 
patch reduced the time for reset/0 from 340ms to 8ms. And for the full 
test suite 6600ms was reduced to 30ms.

Cheers,
Hans

git fetch git://github.com/hanssv/otp.git cover_reset_bottleneck

https://github.com/hanssv/otp/compare/erlang:maint...cover_reset_bottleneck
https://github.com/hanssv/otp/compare/erlang:maint...cover_reset_bottleneck.patch
_______________________________________________
erlang-patches mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-patches