-
Notifications
You must be signed in to change notification settings - Fork 799
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
Improve & unify parallel de-duplication caches #5112
Comments
I spent some time thinking about this. Pulling the parallel state cache down into the A variant of the
I am not sure about the details of that idea yet, e.g. whether a lock on the If this idea makes any sense I am open to implementing it to check if it works well, though I would probably need some advice for proper benchmarking. |
@dknopik Hey, that's awesome. I came to the same conclusion about needing to remove the complete values from the cache. I started working on it on this branch but got distracted by other things: https://github.com/michaelsproul/lighthouse/commits/tree-states-super-cache/ I was thinking we could check the For the freezer, I was thinking that we could iterate back through the slots corresponding to diff layers, and check the If you'd like to work on this I'd love to continue collaborating async. Feel free to use or not use my branch that I started as you see fit! |
Awesome, I'll check it out and experiment a bit and get back to you with any findings! :) |
Description
In #4879 I somewhat hastily introduced a new cache on
tree-states
to improve the performance of parallel HTTP requests. I'm now thinking that this wasn't the best way to implement it, because:tree-states
and its primarystate_cache
, so the current situation is not ideal.Version
Lighthouse v4.6.111-exp.
Steps to resolve
The basic idea is:
store
. Maybe it sits in front of thestate_cache
but only stores slots or state_roots (not full states).The problem is how to manage freezer states. They aren't in the regular
state_cache
and have very different logic for fetching, as well as the ability to index by slot. One option would be two promise caches, where the freezer one sits in front of thediff_buffer_cache
(indexed by slot). Alternatively it may make sense to revive the historic state cache, which so far is lying dormant on the tree-states branch (replaced by the diff buffer cache).The text was updated successfully, but these errors were encountered: