Skip to content

Avoid declaring variables and includes in terminal suggest compare fn #250696

@Tyriar

Description

@Tyriar

We should avoid variables here to help the JIT optimize this very hot function:

// Boost LSP provider completions
const lspProviderId = 'python';
const aIsLsp = a.completion.provider.includes(lspProviderId);
const bIsLsp = b.completion.provider.includes(lspProviderId);

Also includes may be wasteful, can this just be a === check instead?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions