Closed mixmix closed 1 year ago
Here it is in ssb-tribes2
: https://github.com/ssbc/ssb-tribes2/pull/63
Profiling shows that it takes about 500ms to announce the root on the main, but it takes 1600ms to create /root/v1/:shard/main
.
I think all of these waits are coming from lodash.debounce which is sprinkled around in ssb-db2 and async-append-only-log. In some tests we have disabled those timers so that tests run quicker.
Can we close this PR? @mixmix
Background
ssb-tribes2
test suite was taking 3min 40s to run on my desktop. I did a little analysis and found that there was sometimes significant slow-downs callingssb.metafeeds.findOrCreate
, in particular thessb.tribes.start()
seems to take 3 seconds to complete (and it creates locks).Improvement
I noticed that unless we were testing persistence, setting up the
main
feed (publishing the rootMetaFeedId, and setting themain
feed up in a shard...) is slow, and not actually useful for most tests.I experimented with extracting that step and making it possible to turn it off.