-
Notifications
You must be signed in to change notification settings - Fork 234
Remove unnecessary LINQ calls from LanguageServer #743
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
Remove unnecessary LINQ calls from LanguageServer #743
Conversation
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
You're killin' it with these performance tweaks! ❤️
else | ||
{ | ||
symbols = new SymbolInformation[0]; | ||
var symbolAcc = new List<SymbolInformation>(); |
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.
This all looks great. Just curious what the Acc
in symbolAcc
is short for? Accumulator?
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.
Sorry, accumulator, yes. Habit from writing tail-recursive folds in other languages. Maybe I should change it to something more obvious? Always conscious that having so many variables named essentially the same thing is a code smell, so open to suggestions :)
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.
Not a big deal. Just wanted to make sure I understood what it meant.
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
Removes a few LINQ calls from the Language Server, in an effort to chip away at performance issues.
Given how complicated and central the logic here is, I haven't made any style changes, but would be happy to make any :)