-
Notifications
You must be signed in to change notification settings - Fork 12
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
opt: introduce a leaf cache #543
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@@ -108,6 +110,7 @@ impl Tree { | |||
bbn_store, | |||
primary_staging: BTreeMap::new(), | |||
secondary_staging: None, | |||
leaf_cache: leaf_cache::LeafCache::new(32, 1 << 16), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those numbers look magic-y. I assume this is/will be changed in the following PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely, just like the merkle page cache we need to add this to the public API
5b6f729
to
97806a3
Compare
OP is confusing, is it ready to land or not? |
97806a3
to
c92ccf5
Compare
Yes, I believe it's ready for merge (with the stack above it) |
This is super raw; will be refined in later PRs. Let's not merge until the full stack is ready.
The cache is populated when leaves are read and when the workload creates new leaves.