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

Refactor to expose dependencies on NodeContext and avoid NodeContextRepository lookups #92

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

dfederm
Copy link
Member

@dfederm dfederm commented Oct 14, 2024

NodeContext contains the ProjectGraphNode and a NodeContextRepository would be used to look up the NodeContext objects for dependencies. This is deceptively expensive since the lookup requires creating a NodeDescriptor, which allocates a SortedDictionary and copies the global properties to it.

This refactor has NodeContext contain a list of its dependencies (in NodeContext form already) to avoid all these lookups. This actually cascades to quite a bit of simplification and removal of some plumbing to the cache client layer since it was also iterating dependencies so required the NodeContextRepository.

@dfederm dfederm enabled auto-merge (squash) October 14, 2024 22:13
@dfederm dfederm merged commit 6f88747 into main Oct 14, 2024
6 checks passed
@dfederm dfederm deleted the refactor-deps branch October 14, 2024 22:20
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