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

cache the root meta feed in memory #51

Merged
merged 1 commit into from
Sep 23, 2021
Merged

cache the root meta feed in memory #51

merged 1 commit into from
Sep 23, 2021

Conversation

staltz
Copy link
Member

@staltz staltz commented Sep 23, 2021

Here's something nice I bumped into.

If the root meta feed has already been fetched (from disk) or created, then we can just store it in memory, in the lock. This should be an optimization because it prevents subsequent calls to look it up from the disk.

(Actually, now that I'm typing this, I'm not sure if this is worthwhile optimization. ssb-db2 and jitdb seem to have quite a good amount of caching already. Feel free to say no to this PR)

@staltz staltz requested a review from arj03 September 23, 2021 12:42
Copy link
Member

@arj03 arj03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at all, this is a great optimization!

@staltz staltz merged commit 5d5b730 into master Sep 23, 2021
@staltz staltz deleted the cache-root-mf branch September 23, 2021 13:19
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