Skip to content

Remove account leaf cache #3275

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Remove account leaf cache #3275

wants to merge 1 commit into from

Conversation

arnetheduck
Copy link
Member

With static vid lookup we can find cached accounts in O(1) in the regular caches - no need to waste time and effort on maintaining a separate path-based cache for it.

5% speed bump from just the removal - more to be had by reallocating the memory to other causes.

@arnetheduck arnetheduck force-pushed the static-vid branch 2 times, most recently from 49ffbd8 to 3da3aca Compare May 15, 2025 05:54
@advaita-saha advaita-saha mentioned this pull request May 16, 2025
2 tasks
@arnetheduck
Copy link
Member Author

this one is not a db change, once the underlying static-vid branch is merged

Base automatically changed from static-vid to master May 29, 2025 08:54
With static vid lookup we can find cached accounts in `O(1)` in the
regular caches - no need to waste time and effort on maintaining a
separate path-based cache for it.

Without the account leaf cache, the number of queries for non-existing
vids spikes because of all the path-based guesses, which we compensate
with a simpler "empty" cache in the database layer.

We put the memory savings towards the branch/vtx caches instead.
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.

2 participants