Skip to content

Remove unnecessary LINQ calls from LanguageServer - #743

Merged
Rob Holt (rjmholt) merged 7 commits into
PowerShell:masterfrom
rjmholt:linq-crackdown-language-server
Sep 17, 2018
Merged

Rob Holt (rjmholt) merged 7 commits into
PowerShell:masterfrom
rjmholt:linq-crackdown-language-server

Conversation

@rjmholt

Copy link
Copy Markdown
Contributor

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 :)

Copy link
Copy Markdown
Collaborator

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>();

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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 :)

Copy link
Copy Markdown
Contributor

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.

@rkeithhill Keith Hill (rkeithhill) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants