Skip to content
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

Improve performance #1714

Open
6 tasks
Chillee opened this issue May 18, 2017 · 8 comments
Open
6 tasks

Improve performance #1714

Chillee opened this issue May 18, 2017 · 8 comments

Comments

@Chillee
Copy link
Member

Chillee commented May 18, 2017

There's a bunch of places we could improve performance.

  • Don't redraw during repeated insertions
  • Don't redraw for every cursor in multicursor
  • Don't redraw during undo
  • Don't redraw during macros
  • There seems to be a delay in commands like o in switching from normal mode to insert mode. I'm not sure whether this is a visual issue or an actual delay.
  • Offload more things to neovim?
@theprash
Copy link

For ages I thought that VS Code was quite a laggy editor. I just tried disabling VSCodeVim and found it became much better!

The lag seems noticeable for any edits and movements. It's even noticeable during normal typing in insert mode.

@gadkadosh
Copy link
Contributor

One extremely expensive action seems to be the really nice status bar color feature.
Typing 'i123' and then even just a few '.', results in ridiculously slow performance. Without the color changing it's way faster.

@Chillee
Copy link
Member Author

Chillee commented Oct 9, 2017

@gadkadosh About that... It turns out that changing the settings and waiting for the settings to change is a very expensive operation.

How do you feel about us just removing it @xconverge ? I think we should at least put a performance warning, but it seems like a good idea to remove ways that users can shoot themselves in the foot with regards to performance.

@xconverge
Copy link
Member

Users beg for the feature, vscode implements a crippled API and we add the feature, then the feature doesn't work great.

We already state this in the readme:

Notes: Experimental feature, currently due to VSCode API limitations, this function MUST modify settings.json in the workspace. This causes a slight amount of latency and a constant changing diff in your working directory. Issue #1565

https://github.com/VSCodeVim/Vim#vimstatusbarcolorcontrol

I think we should just leave it as is and focus on other performance issues for now.

@neg3ntropy
Copy link

I was using the extension on medium size ts project and had to disable it due to extreme lagging in insert mode. Sometimes, especially when working with mismatched parentheses or unclosed format strings the whole editor just halted completely.

I don't think this issue belongs to one of the proposed improvements so far. There seem to be some really ugly bottlenecks somewhere.

PS vscode 1.18.1 made things even worse than 1.17

@Chillee
Copy link
Member Author

Chillee commented Nov 29, 2017

@soulrebel Sounds like it might be this? #2176

@HybridEidolon
Copy link

If these performance hot spots are still an issue, I have noticed that when the Power Settings on Windows 10 (a Surface Book 2 specifically) are set to anything other than "Best Performance," typing and interacting with the editor becomes incredibly slow (upwards of 50ms per key event handled) and each input gets buffered. This happens whether or not VSCode is running under system bitmap DPI scaling or application-driven Hi-DPI support. Seems like the redraws are the culprit, but I am having trouble navigating the perf tools as it gets very slow when profiling this particular use case.

@imWildCat
Copy link

Any updates on this issue? After trying this extension for about two weeks, I have to turn it off because of the performance issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants