[erlang-patches] Bottleneck in cover:reset/0

Hans Svensson hanssv@REDACTED
Mon Aug 18 10:43:15 CEST 2014


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



More information about the erlang-patches mailing list