-
Couldn't load subscription status.
- Fork 480
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
| } | ||
|
|
||
| public static IEnumerable<AttributeData> GetAttributes(this ISymbol symbol, 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 the params 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 |
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.