[vs18.6] Fix cross-AppDomain TaskItem modifier cache regression#13515
Merged
rainersigwald merged 4 commits intovs18.6from Apr 21, 2026
Merged
[vs18.6] Fix cross-AppDomain TaskItem modifier cache regression#13515rainersigwald merged 4 commits intovs18.6from
rainersigwald merged 4 commits intovs18.6from
Conversation
Recently, ItemSpecModifiers.GetItemSpecModifier was changed to take a Cache struct rather than a single "string? fullPath" parameter. Unfortunately, this increases memory allocations to an unexpected degree -- especially in cross-AppDomain scenarios. This change reduces the size of the Cache struct to just a single FullPath field, which should remove the allocation regression.
Member
|
@copilot bump version to 18.6.2 |
Agent-Logs-Url: https://github.com/dotnet/msbuild/sessions/5ac98ead-0a36-4208-b54e-b451a8372fc9 Co-authored-by: JanProvaznik <25267098+JanProvaznik@users.noreply.github.com>
Contributor
JanProvaznik
approved these changes
Apr 21, 2026
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/2860443/
Recently,
ItemSpecModifiers.GetItemSpecModifierwas changed to take aCachestruct rather than a single "string? fullPath" parameter. Unfortunately, this increases memory allocations to an unexpected degree -- especially in cross-AppDomain scenarios. This change reduces the size of the Cache struct to just a single FullPath field, which removes the allocation regression.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 #13493 to vs18.6