-
Notifications
You must be signed in to change notification settings - Fork 468
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 #4892
Reduce allocations #4892
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4892 +/- ##
==========================================
- Coverage 95.65% 95.64% -0.02%
==========================================
Files 1183 1184 +1
Lines 270513 270536 +23
Branches 16334 16341 +7
==========================================
- Hits 258763 258744 -19
- Misses 9653 9673 +20
- Partials 2097 2119 +22 |
e1e47c9
to
2741c0a
Compare
<!-- Work around PerformanceSensitiveAttribute.cs cannot resolve ValueTask<TResult>. --> | ||
<NoWarn>$(NoWarn);CS1574</NoWarn> |
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.
📝 Submitted #4895 as a draft to remove all these as soon as this PR is published
} | ||
|
||
PostProcessArgument(argumentOperation, isEscaped); | ||
_pendingArgumentsToPostProcess.Remove(argumentOperation); |
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.
@mavasani In order to use the ExtractAll
method (which has clear semantics), I needed to hoist this call to Remove
outside the foreach
(where it combined with the Where
method). Considering there is no other code that checks _pendingArgumentsToPostProcess.Contains
, it seemed like a safe change.
Reduce hot path allocations.
Fixes #4893