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 ProjectSystemProjectFactory.ConvertMetadataReferencesToProjectReferences_NoLock #75646

Conversation

ToddGrun
Copy link
Contributor

This method is pretty high traffic and it's use of the OfType Linq method is showing up as 0.2% of allocations in the speedometer profile I'm looking at of a solution open. Instead of using linq here, it's just as easy to do the ""is" check inline avoid the yield return state machinery.

*** relevant allocations from the speedometer profile ***
image

…rencesToProjectReferences_NoLock

This method is pretty high traffic and it's use of the OfType Linq method is showing up as 0.2% of allocations in the speedometer profile I'm looking at of a solution open. Instead of using linq here, it's just as easy to do the ""is" check inline avoid the yield return state machinery.
@ToddGrun ToddGrun requested a review from a team as a code owner October 26, 2024 19:16
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 26, 2024
@ToddGrun
Copy link
Contributor Author

@dotnet/roslyn-ide ptal

1 similar comment
@ToddGrun
Copy link
Contributor Author

ToddGrun commented Nov 4, 2024

@dotnet/roslyn-ide ptal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants