NuGet nomination code causes unnecessary allocations #13449
Labels
Priority:2
Issues for the current backlog.
Product:VS.Client
Style:PackageReference
Tenet:Performance
Performance issues
Type:Bug
Check
VsSolutionRestoreService
andVSNominationUtilities
for inappropriate usage of LINQ, particularly examples like:https://github.com/NuGet/NuGet.Client/blob/f702fc3dc44e17a0666dea01e9aa18c5c1175b27/src/NuGet.Clients/NuGet.SolutionRestoreManager/VsSolutionRestoreService.cs#L295-L298
Collections should be created with the correct initial capacity to avoid risk of resizing.
anonymous lamba functions cause allocations too, which can be avoided with for loops.
The text was updated successfully, but these errors were encountered: