dotnet / dotnet/msbuild

[BuildCheck Suggestion]: Batching Copy task invocations

Open
#12,884 1 comment 1 reaction 0 assignees View on GitHub
Area: BuildCheck backlog BuildCheck Suggestion triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Summary

We should have a check for calls of the Copy task that are batched, instead of in a single low-overhead parallelizable invocation.

### Background and Motivation

One fairly common antipattern in builds is batching when not necessary. `Copy` is a great example--it can inherently handle most file-copying tasks in a single invocation and uses internal parallelism to copy things quickly, but it's sometimes easier to understand a batched invocation where a single file gets copied. But then you pay a performance cost for that forever.

### Sample issue or antipattern that the check should be flagging

```xml

```

### Sample output

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.