Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce allocations in AbstractTypeMap #72588

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

ToddGrun
Copy link
Contributor

Partial fix for #68996

Both SubstituteTypesWithoutModifiers and SubstituteNamedTypes allocate a temporary array that is used to potentially return an immutable array. Previously, this immutable array was allocated if needed, whereas we can not perform the extra allocation by utilizing ImmutableCollectionsMarshal as the array being wrapped is local to this method.

Partial fix for dotnet#68996

Both SubstituteTypesWithoutModifiers and SubstituteNamedTypes allocate a temporary array that is used to potentially return an immutable array. Previously, this immutable array was allocated if needed, whereas we can not perform the extra allocation by utilizing ImmutableCollectionsMarshal as the array being wrapped is local to this method.
@ToddGrun ToddGrun requested a review from a team as a code owner March 18, 2024 22:13
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 18, 2024
@ToddGrun ToddGrun merged commit 4880891 into dotnet:main Mar 19, 2024
24 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 19, 2024
333fred added a commit that referenced this pull request Mar 20, 2024
* upstream/main: (1045 commits)
  Fix excessive compilation times due to speculative parsing after an incomplete string (#72565)
  Convert official pipeline to 1ES template (#72430)
  Fix #69628 Analyzer summary should show suppressor ID (#72569)
  Fix event hookup even when in a projection buffer
  Drop win32-ia32 language server support
  Remove workaround for .net7 r2r assembly loading issue
  remove unused usings
  Share compilation when generators don't produce any generated files
  Fix potential exception in AssetProvider.SynchronizeAssetsAsync (#72597)
  Fix
  Update __arglist.md (#72523)
  Improve code gen for concatenation of `string` and `char` (#71793)
  Reduce File I/O under the AnalyzerAssemblyLoader folder (#72412)
  Reduce allocations in AbstractTypeMap (#72588)
  disable diagnostics when solution crawler option is disabled
  disable diagnostics when solution crawler option is disabled
  better thread transitions
  Fix
  Add check
  Fix
  ...
@RikkiGibson RikkiGibson modified the milestones: Next, 17.10 P3 Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants