Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to skipMainFeed connection #121

Closed
wants to merge 1 commit into from
Closed

Conversation

mixmix
Copy link
Member

@mixmix mixmix commented Feb 17, 2023

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 calling ssb.metafeeds.findOrCreate , in particular the ssb.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 the main 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.

@mixmix
Copy link
Member Author

mixmix commented Feb 17, 2023

Here it is in ssb-tribes2 : ssbc/ssb-tribes2#63

@staltz
Copy link
Member

staltz commented Feb 17, 2023

Profiling shows that it takes about 500ms to announce the root on the main, but it takes 1600ms to create /root/v1/:shard/main.

@staltz
Copy link
Member

staltz commented Feb 17, 2023

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.

@staltz staltz mentioned this pull request Feb 20, 2023
@staltz
Copy link
Member

staltz commented Jul 10, 2023

Can we close this PR? @mixmix

@mixmix mixmix closed this Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants