-
Notifications
You must be signed in to change notification settings - Fork 735
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
[NFC] Make Precompute use a lazy LocalGraph #6934
Conversation
…ompute.efficient.2
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.
Since the computation isn't lazy in a fine-grained way that pessimizes performance when all the information will be needed, would it make sense to compute these on demand for all LocalGraph
s and not just lazy ones?
Other than that question, LGTM.
I think maybe not, since laziness has a cost, even if small. If you know you will definitely need |
To do this, add
locations
andgetInfluences
toLazyLocalGraph
. Both cannotreally be computed in a fine-grained manner, so just compute them all on the
first request. That is not as efficient as our lazy computation of
getSets
andsetInfluences
, but they are also less important, and this change makes thepass 20% faster.