-
Notifications
You must be signed in to change notification settings - Fork 693
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
Unroll LINQ usage to trim some allocations in AddMSBuildAssets #5584
Conversation
@Erarndt - Could we please get some microbenchmarking to understand any perf gains with this commit? This is a requirement for all changes done to improve performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs perf benchmark as stated before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good.
I think given that the linked issue is not directly related to the change here, I think it'd be save to just assume we need a new issue for these PRs.
@Erarndt Can you post the PerfView results blaming these allocations? @aortiz-msft Unrolling LINQ is a well-known pattern that we've applied 1000s of times in this and other code bases. Micro-benchmarking a change like this adds a overhead to the contribution of these fixes and slows down the work. I think benchmarking should be saved for larger/riskier changes and not patterns we just know from experience are faster. We've also contributed similar fixes in this codebase without micro-benchmarks. |
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 90 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 90 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
Makes sense. Sorry, I didn't realize I had marked my comment as blocking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Bug
Fixes: NuGet/Home#13223
Regression? Last working version:
Description
Unrolls some LINQ usage to avoid allocation overhead.
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation