-
Notifications
You must be signed in to change notification settings - Fork 693
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
Switch CreateNodeAsync to an iterative approach #5624
Conversation
Manually run CI was passed: https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=9041709&view=results |
src/NuGet.Core/NuGet.DependencyResolver.Core/Remote/RemoteDependencyWalker.cs
Outdated
Show resolved
Hide resolved
@jeffkl You can run the CI on |
I can it against |
The checks are based on the commit sha on top of the branch, so you have to use head |
Thanks for the tip! I've started CI again but this time the checks are coming through 🎉 |
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.
Beyond allocations, are there wall clock improvements?
I know @jeffkl's running substrate, but we probably want more data here.
src/NuGet.Core/NuGet.Commands/RestoreCommand/SourceRepositoryDependencyProvider.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/SourceRepositoryDependencyProvider.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/SourceRepositoryDependencyProvider.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.DependencyResolver.Core/Remote/RemoteDependencyWalker.cs
Outdated
Show resolved
Hide resolved
// do not add nodes for all the centrally managed package versions to the graph | ||
// they will be added only if they are transitive | ||
foreach (var dependency in node.Item.Data.Dependencies) | ||
int index; | ||
for (index = currentState.DependencyIndex; index < node.Item.Data.Dependencies.Count; index++) |
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.
Aren't we losing some of the parallelism we had here previously?
Now the graph is walked completely synchronously.
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 90 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
5d12337
to
c3e2bf5
Compare
…erarndt-iterativeWalk
Bug
Fixes: NuGet/Home#13222
Regression? Last working version:
Description
This change updates the implementation of
CreateNodeAsync
to avoid async state machine allocations (<CreateGraphNodeAsync>d__3
) caused by recursion. In larger restores, these were a significant amount of allocations (:After:
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation