-
Notifications
You must be signed in to change notification settings - Fork 768
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
Completion items are sent back with a lot of duplicates #4919
Comments
Dirk added this feature here: microsoft/vscode-languageserver-node@0b7acc1 We want to use this in Pylance in order to speedup completions. For the degenerate case, this can speedup completion results by 30%. See microsoft/pyrx#4113 and microsoft/pylance-release#4919
Okay this is blocked on possibly changing the LSP client code to combine the data differently: |
Changes taking advantage of this are here: |
Another possible size optimization would we to eliminate the The other half were functions that needed the HeeJae agrees that this could make the response smaller, but is concerned about the perf impact of deciding when Here's a typical "textEdit": {
"range": {
"start": {
"line": 13,
"character": 0
},
"end": {
"line": 13,
"character": 1
}
},
"newText": "_P"
}, |
a lot of range is same since it refer to the same range, if completion has a way to internalize or share range between items, that would save a lot of repeated text (text of LSP message) |
Since 3.17, LSP has a way to send duplicate data on completions only once instead of in each completion item.
This here:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem
Doing so could make Pylance faster (and make sync server closer to async server)
The text was updated successfully, but these errors were encountered: