Item operation perf in _GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
I have an unconfirmed hunch that we can speed up some item operations in the `_GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences` target.
Consider for example this snippet:
https://github.com/dotnet/msbuild/blob/dbf8d12deab2aee74f1bd574c1ecad2b39f552b4/src/Tasks/Microsoft.Common.CurrentVersion.targets#L5108-L5109
My understanding is that this can be collapsed in a single line with the condition Always or PreserveNewest.
This pattern is used quite a lot:
https://github.com/dotnet/msbuild/blob/dbf8d12deab2aee74f1bd574c1ecad2b39f552b4/src/Tasks/Microsoft.Common.CurrentVersion.targets#L5108-L5178
I'd be curious to measure the performance of a reasonable large build with a lot of project references and copy to output, and see if we can see any difference. You can use this query in the binlog viewer: `$target GetCopyToOutputDirectoryItems $time`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.