Skip to content

Remove closure/delegate allocation in ItemContainerGenerator#6396

Merged
dipeshmsft merged 1 commit intodotnet:mainfrom
stephentoub:itemcontainergenerator
Aug 10, 2022
Merged

Remove closure/delegate allocation in ItemContainerGenerator#6396
dipeshmsft merged 1 commit intodotnet:mainfrom
stephentoub:itemcontainergenerator

Conversation

@stephentoub
Copy link
Member

@stephentoub stephentoub commented Apr 11, 2022

Description

Calls to ItemContainerGenerator.DoLinearSearch are capturing locals to use for comparison, resulting in closure/delegate allocations on each call. We can instead pass the extra state through as a state argument.

Customer Impact

Unnecessary allocation/overhead.

Regression

No

Testing

CI

Risk

Minimal.

Microsoft Reviewers: Open in CodeFlow

@stephentoub stephentoub requested a review from a team as a code owner April 11, 2022 19:47
@ghost ghost assigned stephentoub Apr 11, 2022
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Apr 11, 2022
@ghost ghost requested review from SamBent, dipeshmsft and singhashish-wpf April 11, 2022 19:47
@dipeshmsft dipeshmsft merged commit 654b98b into dotnet:main Aug 10, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 9, 2022
@stephentoub stephentoub deleted the itemcontainergenerator branch September 4, 2024 14:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants