[vs18.6] Fix telemetry allocation regression: per-engine collector ownership#13581
Merged
rainersigwald merged 5 commits intovs18.6from Apr 21, 2026
Merged
[vs18.6] Fix telemetry allocation regression: per-engine collector ownership#13581rainersigwald merged 5 commits intovs18.6from
rainersigwald merged 5 commits intovs18.6from
Conversation
Eliminates ~200MB allocation regression from PR #13413 by removing per-request WorkerNodeTelemetryData dictionary allocations entirely. Each BuildRequestEngine creates its own ITelemetryForwarder (via TelemetryForwarderProvider.CreateForwarder) and passes it to builders through NodeLoggingContext: - TelemetryForwarder owns WorkerNodeTelemetryData (no locking needed - the engine's one-active-builder-at-a-time invariant guarantees single-threaded access, see #13531) - RequestBuilder calls AddTarget/AddTask directly - BuildRequestEngine calls FinalizeProcessing at CleanupForBuild - TelemetryForwarderProvider is the factory, not a data-holding singleton Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pure rename - no behavioral changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
|
@copilot set version to 18.6.3 in eng/Versions.props |
Agent-Logs-Url: https://github.com/dotnet/msbuild/sessions/fe8e1058-045d-44a3-8723-44bcfaf1c294 Co-authored-by: JanProvaznik <25267098+JanProvaznik@users.noreply.github.com>
Contributor
JanProvaznik
approved these changes
Apr 21, 2026
Member
|
note: merge after #13515 |
rainersigwald
approved these changes
Apr 21, 2026
This was referenced Apr 21, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2855299/
A prior thread safety fix to telemetry infrastructure caused excessive copies of data. This pull request makes the telemetry objects owned correctly reducing the need to copy the data.
Customer Impact
caught by automated VS perf tests to cause 100s of MB extra allocations
Regression? (was it working in a previous release or preview?)
Yes
Risk (see taxonomy)
Low
Link the PR to the original issue and to the PR to main.
Backport of #13516 to vs18.6