-
Notifications
You must be signed in to change notification settings - Fork 28.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to reduce size of completions DTO (#164087)
JS/TS can return a lot of completions. I noticed that just parsing this was taking a bit of time, so I tried to reduce the message size with the following changes: - Inline the command properties on `ISuggestDataDto` - Drop the `title` and `tooltip` from the command since we don't use these - Shorten the delegate command name - If using an `$ident` command, don't send over the command arguments since the arguments are always `[$ident]` - Make commit characters a string instead of an array Here's an example of a dto for a completion item before: ``` {"x":[2,0],"a":"$","b":4,"e":"15","i":0,"k":[".",",",";","("],"m":{"$ident":867,"id":"_vscode_delegate_cmd_l9g7z48t","title":"","arguments":[867]}} ``` And after: ``` {"x":[1,0],"a":"$","b":4,"e":"15","i":0,"k":".,;(","n":11,"o":"__vsl9g7vfno"} ``` For global completions in a JS/TS file, this makes the completion response a little over 40% smaller.
- Loading branch information
Showing
4 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters