meta: VS Code Vim becomes very very slow
Many people report this plugin slows down.
For me it becomes unbearably slow after a while (f.e. 1 key stroke per second, and they all get backed up while other VS Code actions can happen mid-way causing jumbled results).
Possibly related:
- https://github.com/VSCodeVim/Vim/issues/9708
- https://github.com/VSCodeVim/Vim/issues/8924
- https://github.com/VSCodeVim/Vim/issues/8557
- https://github.com/VSCodeVim/Vim/issues/8517
- https://github.com/VSCodeVim/Vim/issues/8115
- https://github.com/VSCodeVim/Vim/issues/7898
- https://github.com/VSCodeVim/Vim/issues/7804
- https://github.com/VSCodeVim/Vim/issues/7546
- https://github.com/VSCodeVim/Vim/issues/7415
- https://github.com/VSCodeVim/Vim/issues/7274
- maybe https://github.com/VSCodeVim/Vim/issues/6628
- https://github.com/VSCodeVim/Vim/issues/6589
- https://github.com/VSCodeVim/Vim/issues/5339
- https://github.com/VSCodeVim/Vim/issues/4728
- https://github.com/VSCodeVim/Vim/issues/4598#issuecomment-591769018
- https://github.com/VSCodeVim/Vim/issues/4293
- https://github.com/VSCodeVim/Vim/issues/4283
- https://github.com/VSCodeVim/Vim/issues/3957
- https://github.com/VSCodeVim/Vim/issues/3508
- https://github.com/VSCodeVim/Vim/issues/8887
- https://github.com/VSCodeVim/Vim/issues/8573
- https://github.com/VSCodeVim/Vim/issues/7301
- https://github.com/VSCodeVim/Vim/issues/6830 (still a problem)
- https://github.com/VSCodeVim/Vim/issues/6169
- https://github.com/VSCodeVim/Vim/issues/5188 (still problematic)
- https://github.com/VSCodeVim/Vim/issues/4941 (still problematic)
- https://github.com/VSCodeVim/Vim/issues/4309
- https://github.com/VSCodeVim/Vim/issues/4088
- https://github.com/VSCodeVim/Vim/issues/3924
- https://github.com/VSCodeVim/Vim/issues/3654
(I went to page 2 only, for both open and closed issues, searching "slow")
Related:
- https://github.com/VSCodeVim/Vim/issues/8603
It might be "Microsoft's" fault for the extension API design? From https://github.com/VSCodeVim/Vim/issues/4598#issuecomment-591769018:
FWIW, I just tried amVim and it has the same issue. Perhaps the Extension Host is to blame for this? I would not be surprised, I think the Extension Host is garbage, and causes way more problems than it was intended to solve. (VSCodeVim commands do have to run in the separate extension host process right? It's pretty ridiculous for every key press to be doing IPC roundtrips, which is why I hate the Extension Host architecture for giving you no other option...)
I switched to Simple Vim
and it is a lot smoother.
In insert mode, it's just native VS Code, and the plugin listens only for Escape to go back to Normal mode. It's not as full featured, but enough for me to get productive without slowdowns, and to save my sanity.
Simple Vim still suffers from the same issues (seems like Extension Host), but it's doing a lot less so the issues aren't as pronounced.
Agreed this is a problem - I am currently awaiting a review on a pr that reduces a tiny bit of overhead foreach keypress https://github.com/VSCodeVim/Vim/pull/9874
+1
+1 It's bordering on unusable for me now.
I couldn't withstand the slowness anymore.
I switched to Simple Vim
and it is a lot smoother.
In insert mode, it's just native VS Code, and the plugin listens only for Escape to go back to Normal mode. It's not as full featured, but enough for me to get productive without slowdowns, and to save my sanity.
Normal mode can still slow down, but it is nowhere near as bad as Insert mode in VSCodeVim. It seems the Extension Host is an overall problem all extensions face. But at least Insert in Simple Vim mode is vanilla VS Code, which really helps, because writing was grinding to a halt.
Problem with VS Code Vim
The worst slowness is while typing in Insert mode. Typing a 7-word sentence takes 7+ seconds after VS Code has been open for a while (I think it's indirectly related to that, and other apps, taking up system memory).
I recorded a profile, and during insert mode (typing a 7-word sentence) the doGetNextEditWithSelection function takes up most of the time:
Upstream issue:
- https://github.com/microsoft/vscode/issues/75627
This meta issue should actually be in the MS VSCode repo :). I'll migrate there when I get a chance, and then link to more issues in other extensions.