The problem was that the “waves of actors” test leaves behind lots of garbage for the CTD to clean up, and its own CallingThreadDispatcherQueues.gc() then happens to run when the guardian creates the top-level actor in the following test case, which takes longer than 3 seconds to run. Fix it by making the GC interval 100ms instead of 1sec so that the amount of garbage is limited. Also, replacing .mapValues(...).filter(...) with .foldLeft(.newBuilder)(...) makes it twice as fast. And even more so: unregistering mailboxes upon actor termination removes the cost nearly completely for the “waves of actors” case. |
||
|---|---|---|
| .. | ||
| main | ||
| test | ||