- Notifications
You must be signed in to change notification settings - Fork481
[Performance] Improve UseValidPlatformString (CA1418) performance#6867
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| } | ||
| } | ||
| publicstaticIEnumerable<AttributeData>GetAttributes(thisISymbolsymbol,INamedTypeSymbol?attributeTypeToMatch1,INamedTypeSymbol?attributeTypeToMatch2) |
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.
Note: This is called for every named type, method, property, field, and event in the compilation. So using theparams overload was likely inefficient.
An alternative is that the analyzer would pre-allocate a single array at compilation start, but I went with these overloads so that other analyzers could benefit as well.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@## main #6867 +/- ##==========================================- Coverage 96.39% 96.39% -0.01%========================================== Files 1403 1403 Lines 330977 330996 +19 Branches 10890 10894 +4 ==========================================+ Hits 319055 319072 +17- Misses 9188 9191 +3+ Partials 2734 2733 -1 |
buyaa-n left a comment
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, thanks!
No description provided.