Skip to content

Conversation

ToddGrun
Copy link
Contributor

@ToddGrun ToddGrun commented May 22, 2025

Customer profile is showing a very large number of allocations in the GetAllDiagnostics call, due to the yield state machinery. Added internal method to TagHelperDescriptor that allows callers to pass in a PooledArrayBuilder for the diagnostics to be added directly to, instead of using "return yield".

Customer profile showed 1.2 GB(!!) of memory allocations due to this.
image

Partial fix for https://developercommunity.visualstudio.com/t/Razor-Development:-30-Second-CPU-Churn-A/10904811

Customer profile is showing a very large number of allocations in the GetAllDiagnostics call, due to the yield state machinery. Add internal method to TagHelperDescriptor that allows callers to pass in a PooledArrayBuilder for the diagnostics to be added directly to, instead of using "return yield".

Partial fix for dotnet/roslyn#78639
@ToddGrun ToddGrun requested a review from a team as a code owner May 22, 2025 19:48
@ToddGrun
Copy link
Contributor Author

@dotnet/razor-compiler for reviews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants