-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TargetEntry optimizations for Results (#9590)
Context @jeffkl has a case with potentially thousands of items that would all go into one bucket in the Returns. MSBuild is deduplicating it, but so is NuGet, which is wasteful, so he will likely stop using Returns. This change will save him a small amount of allocations, but it would save a ton of allocations if he were to keep using it, since it will no longer need to repeatedly reallocate the HashSet, and it won't need to allocate as many Lists. It will still save one List's worth of allocations on every single Target that doesn't have a Returns. Changes Made Effectively making List allocations lazier and taking advantage of ToList to avoid doing as many (duplicated) collection operations.
- Loading branch information
Showing
1 changed file
with
28 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters