-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Shared EvaluationContext for graph construction #9680
Shared EvaluationContext for graph construction #9680
Conversation
Fix dotnet#9678 by creating a single shared `EvaluationContext` in the `Graph` object and using it when creating `ProjectInstance`s using the default factory. This is similar to how NuGet static-graph restore already works: https://github.com/NuGet/NuGet.Client/blob/b83566ec2369c4e9fd07e6f95d734dfe370a1e66/src/NuGet.Core/NuGet.Build.Tasks.Console/MSBuildStaticGraphRestore.cs#L885 Since we're evaluating the projects in the graph in parallel and "all at once", the shared caches in the `EvaluationContext` should be a solid improvement.
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.
Nice job. Have you measured it? If not I can do that on VCProj, would be nice to know.
Do you remember what you were thinking of about VCProj? Was it for building the graph that part of the VS repo? If so this won't help: those scenarios already had good SDK resolution caching; it's the simple API calls like |
Fix #9678 by creating a single shared
EvaluationContext
in theGraph
object and using it when creatingProjectInstance
s using the default factory.This is similar to how NuGet static-graph restore already works: https://github.com/NuGet/NuGet.Client/blob/b83566ec2369c4e9fd07e6f95d734dfe370a1e66/src/NuGet.Core/NuGet.Build.Tasks.Console/MSBuildStaticGraphRestore.cs#L885
Since we're evaluating the projects in the graph in parallel and "all at once", the shared caches in the
EvaluationContext
should be a solid improvement.