Migrate ApplyCompressionNegotiation to IMultiThreadableTask - #54703
jankratochvilcz merged 1 commit into
Conversation
No decoy-style unit test added — not viable hereThis is an attribute-only opt-in. A decoy-CWD test of the form used for |
There was a problem hiding this comment.
Pull request overview
This PR annotates ApplyCompressionNegotiation as an MSBuild multi-threadable task by adding [MSBuildMultiThreadableTask], with the goal of enabling MSBuild to schedule it concurrently and improve build performance in static web assets compression negotiation.
Changes:
- Add
[MSBuildMultiThreadableTask]toApplyCompressionNegotiation.
| namespace Microsoft.AspNetCore.StaticWebAssets.Tasks; | ||
|
|
||
| [MSBuildMultiThreadableTask] | ||
| public class ApplyCompressionNegotiation : Task |
There was a problem hiding this comment.
ToAssetDictionary->fromTaskItem->normalize->getFullPath
f119571 to
101b8f9
Compare
Marks the task with [MSBuildMultiThreadableTask] so MSBuild's multithreaded mode skips the per-task TaskHost wrapper. The task body has no filesystem / environment / process I/O, so attribute-only opt-in is sufficient per the migration skill. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
101b8f9 to
f145082
Compare
Migrates
ApplyCompressionNegotiation(src/StaticWebAssetsSdk/Tasks/ApplyCompressionNegotiation.cs) to multi-threadable by adding[MSBuildMultiThreadableTask].Fixes dotnet/msbuild#14031
Perfstar regression (14d, Windows, paired MT vs non-MT, p50 sum across iterations)
ResolveBuildCompressedStaticWebAssetsChanges
[MSBuildMultiThreadableTask]on the concrete class. NoIMultiThreadableTaskplumbing needed — the task body has no filesystem / environment / process I/O (pure metadata propagation and string composition).Compatibility sins audit (per migration skill)
24/24 dimensions clean — attribute-only opt-in. No
Path.*/File.*/Directory.*/Environment.*/Process.*calls; no[Output]AbsolutePath leakage; no new null-coalescing; no try/catch reorg; no dictionary keys requiring canonicalization; no exception-type divergence.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com