-
Notifications
You must be signed in to change notification settings - Fork 37
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
Extension causes huge typing latency spikes #321
Comments
Interestingly, disabling every extension except this one does not lead to the input latency spike on gibberish but it does still lead to 100% CPU usage. My guess is that while this extension is doing something suboptimal, things get even worse when it interacts with one of my other extensions. I used the command below.
|
My intuition was correct: this extension pairs badly with the Vim emulation extension. Note that VS Code Vim is an incredibly popular extension. I ran the same experiment with this command:
That disables everything except VS Code Vim and spellright. I could repro the input latency spike. |
Thank you for thorough investigation. This issue is somehow known to me (#1) and it has been mitigated a bit since then but still the only way to fight it properly is, I presume, delegate the extension to Language Server. It has been partially done alas, I have very little time recently to deal with the extension. |
All of this means that the spell checking itself is very slow. I'm also affected by this problem, and based on the very high CPU usage, it seems to me more like a brute force search instead of a (fast) map based solution (I haven't checked the code, so I don't know for sure). |
Repro steps:
vscode_setup.sh
can install all the extensions I use.I can observe CPU usage climbs to +90% as well during step 5 above. This is on a workstation machine using a beefy Intel Core i5-8600K CPU @ 3.60GHz.
Disabling only this extension removes all typing latency. Typing gibberish outside of a comment region (where spell checking is disabled) shows latency spikes during typing.
If it's hard to nail down what's causing this (and even if it's not), I'd appreciate an option that delays spell checking until the user has stopped typing for 100ms (or more). This would prevent the extension from interfering with character input. I don't need spell check to run after every character typed and I doubt anyone else needs it either.
VS Code version info:
Version: 1.40.0
Commit: 86405ea23e3937316009fc27c9361deee66ffbf5
Date: 2019-11-06T18:14:08.920Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 4.19.0-5-amd64
The text was updated successfully, but these errors were encountered: