dotnet/roslyn
Auf GitHub ansehenRefactor `CheckFeatureAvailability` to not accept a `Location` parameter
Open
#68.935 geöffnet am 8. Juli 2023
Area-CompilersArea-Performancehelp wanted
Repository-Metriken
- Stars
- (20.414 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)
Beschreibung
Currently, CheckFeatureAvailability overloads take a Location parameter. Causing caller to call syntaxNode.Location which allocates a SourceLocation. At the end, if the feature is available, the allocation is thrown away.
Example:
Not sure how much this pattern is hit, but it's good to optimize this anyway.