-
Committer:
Tarmac
-
Author(s):
Daniel van Vugt
-
Date:
2017-03-15 08:43:38 UTC
-
mfrom:
(4084.2.3 medi)
-
Revision ID:
tarmac-20170315084338-24ypetor0hll2qgt
Optimize a crazily inefficient test case (LP: #1671033)
Not a threading problem this time, but a general algorithmic complexity
problem. The test itself was running 50x longer than it needs to, and
the FakeAlarmFactory class it uses was copying a vector 3 million times during the one test case (now zero times).
Execution times under valgrind:
Before: 30 seconds; After: 0.7 seconds
Execution times natively:
Before: 0.8 seconds; After: 0.01 seconds. Fixes: https://bugs.launchpad.net/bugs/1671033.
Approved by Alan Griffiths, mir-ci-bot.