Skip to content

Avoid some smaller allocations in ItemGroupintrinsicTask #11779

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

Merged

Conversation

Erarndt
Copy link
Contributor

@Erarndt Erarndt commented May 1, 2025

Fixes #

Context

Changes Made

Testing

Notes

@Copilot Copilot AI review requested due to automatic review settings May 1, 2025 20:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR seeks to reduce unnecessary allocations in the ItemGroupIntrinsicTask by replacing LINQ-based filtering with direct iteration and by optimizing HashSet initialization.

  • Replaces LINQ queries with direct foreach loops in metadata removal sections
  • Initializes a HashSet with a preset capacity in EvaluateExcludePaths to avoid rehashing

@SimaTian SimaTian mentioned this pull request Apr 1, 2025
6 tasks
Copy link
Member

@SimaTian SimaTian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor naming correction.
Also one test has failed so I'm re-running it. If it passes, we have a bunch of flaky ones. Otherwise we will need to dig deeper into it.

Copy link
Member

@AR-May AR-May left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me, thank you for the improvements.
I have just a couple of renaming proposals.

@SimaTian
Copy link
Member

SimaTian commented May 9, 2025

I've attempted the suggested naming fixes in the github UI. If I messed up, I will have to clone into VS to fix properly.
Otherwise I hope we can merge.

@SimaTian SimaTian enabled auto-merge May 13, 2025 14:37
@SimaTian SimaTian merged commit fc7b639 into dotnet:main May 13, 2025
10 checks passed
@Erarndt Erarndt deleted the dev/erarndt/ItemGroupintrinsicTaskAllocations branch May 13, 2025 17:44
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.

3 participants