dotnet / dotnet/msbuild

E2E task-parameter perf: convert an in-box task (e.g. Copy) to typed parameters and measure before/after

Open
#14,236 0 comments 0 reactions 0 assignees View on GitHub
Area: Performance Area: Tasks backlog triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

## Background

PR #13971 adds core support for `AbsolutePath`/`FileInfo`/`DirectoryInfo` and `ITaskItem` as task parameters, along with a **micro-benchmark** (`TaskParameterBindingBenchmark`) that isolates the parameter-binding cost.

During review ([comment](https://github.com/dotnet/msbuild/pull/13971)) it was suggested we also do an **end-to-end** comparison: actually build a real project with a task taking `ITaskItem` / `FileInfo` vs. the same task taking `string`, and measure the wall-clock + total-allocation delta.

That's a meaningfully larger harness than the micro-benchmark, so it's being tracked separately here rather than expanding the PR.

## Proposal

Once the typed-parameters PR chain lands:

1. Pick a real in-box task that takes path-like `string`/`ITaskItem` parameters today — the **`Copy` task** is a good candidate.
2. Produce a variant that consumes the new typed parameters (`ITaskItem` / `AbsolutePath` / etc.).
3. Run a representative real build both ways and capture:
- wall-clock time
- total managed allocations
4. Report the before/after so we can quantify the real-world impact (not just the isolated binding cost).

## Notes

- This complements, rather than replaces, the existing micro-benchmark.
- Results should inform whether/where converting in-box tasks to typed parameters is worthwhile.

Tracking follow-up from PR #13971.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review PR #13971 and the existing TaskParameterBindingBenchmark first, then examine the in-box Copy task as the proposed end-to-end candidate. Create comparable string and typed-parameter builds, run a representative real build, and report before/after wall-clock time and total managed allocations.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.