make contentChanges smaller in DidChangeTextDocumentParams #241
Conversation
|
Please look how short the cursor stops blinking while completion of text due to this change. |
|
I'll fix errors by vint. |
prabirshrestha
left a comment
There was a problem hiding this comment.
Thanks for doing this. This will definitely help people with large files and will also solve hangs for most of the people.
Also any plans to send let diff = diff(text1, text2) patches to vim in the future? My theory is that computing diff in C would help with the speed.
|
So I played with this branch for around 15mins and was impossible to hang vim. Before this it used to take me < 10sec to hang vim on large files. It is a great improvement. For now I will be using this branch until it gets merged to master. Good to see all the perf fixes coming well. |
Do you have an idea for the API? It must be generic API. |
|
If my english is bad, please point that. |
| endif | ||
| ``` | ||
|
|
||
| vim-lsp support incremental changes of Language Server Protocol. |
|
👍 Approved. Tested the branch and works. Can be merged after the CI completes. |
|
Merged. Thanks, |
Current implementation send whole text of buffer when text was changed. This make vim slowly. This change make it smaller using https://github.com/natebosch/vim-lsc/blob/master/autoload/lsc/diff.vim .
Thanks to @natebosch
See following screenshots. I'm editing src/compiler/checker.ts (1.8MB) in repository of typescript .
Before applying this change
After applying this change
I guess most of time was taken in typescript-language-server.
If the buffer is smaller, completion is very fast.