This speeds up our "create and sync data" test. On my machine, it went from ~73 seconds to ~12.
I did this by making a few changes:
Decrease the number of managers from 10 to 5, dramatically reducing the amount of connections required. I don't think 10 really offers much here, other than perhaps a stress test, and lowering it offers a huge speedup.
Run assertions concurrently.
When comparing sets, use Set instead of sorted arrays. This speeds things up a bit.
Use node:assert instead of Brittle for a slight performance boost. We also plan to drop Brittle in the future and this will ease the transition.
Each of these could theoretically be done separately.
I've been running this test a lot which is why I'm fixing this now.
I recommend reviewing this with whitespace changes disabled.
This speeds up our "create and sync data" test. On my machine, it went from ~73 seconds to ~12.
I did this by making a few changes:
Decrease the number of managers from 10 to 5, dramatically reducing the amount of connections required. I don't think 10 really offers much here, other than perhaps a stress test, and lowering it offers a huge speedup.
Run assertions concurrently.
When comparing sets, use
Set
instead of sorted arrays. This speeds things up a bit.Use
node:assert
instead of Brittle for a slight performance boost. We also plan to drop Brittle in the future and this will ease the transition.Each of these could theoretically be done separately.
I've been running this test a lot which is why I'm fixing this now.