Vim: CPU ran into 200%+ in VSCode 1.18.0

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Environment:

  • VSCode Version: 1.18.0
  • VsCodeVim Version: 0.10.2
  • OS: macOS 10.13.2 Beta (17C67b)

What happened:

When I upgrade to VSCode 1.18.0 the CPU ran into extreme high, I found it caused by two Code Helper.app processes. Then I just disabled all extensions, everything is OK. It is clear that this issues is caused by extensions conflicts with VSCode, so I re-enabled each extension to figure out which one caused this situation. Finally I found it is VSCodeVim, I just re-enabled every other extensions everything is OK, but after re-enable VSCodeVim, the CPU went high.

So I don’t know do you guys have the same issue?

What did you expect to happen:

Normal CPU usage.

How to reproduce it:

  • Install VSCode 1.18.0
  • Install VSCodeVim and enabled it

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 99
  • Comments: 29 (3 by maintainers)

Most upvoted comments

@nzig that blog post says:

Currently only statusBarItem.errorBackground is supported to avoid the Status bar looking too colorful.

so it looks to me like that’d be of limited use…

FWIW I managed to find a solution to color the status bar item based on its text, using the Customize UI extension:

    "customizeUI.stylesheet": {
        "#vscodevim\\.vim\\.primary[aria-label=\"-- INSERT --\"]": "background-color: #98971a !important;",
        "#vscodevim\\.vim\\.primary[aria-label=\"-- VISUAL --\"]": "background-color: #b16286 !important;",
        "#vscodevim\\.vim\\.primary[aria-label^=\":\"]": "background-color: #7c6f64 !important;",
    },

result:

image

image

image

image

Have the same thing. Arrived at Vim extension by elimination of extensions. Profiled the extension and got this:

image

Which hints at my customising the status bar colors. Removed my config and everything is normal again!

confirm that "vim.statusBarColorControl": false fixes the issue. great catch @jondot 👍 don’t think it’s a real fix but rather a workaround 😄

FWIW I managed to find a solution to color the status bar item based on its text, using the Customize UI extension:

For some reason this does not work for me. How do you find those values (“#vscodevim.…”). Maybe those are different now.

They are indeed! It’s #vscodevim\\.vim\\.primary now, adjusted above.

I found them by opening the developer tools (Ctrl-Shift-P, “Developer: Toggle Developer tools”) and then using the picker at the top left of the “Elements” tab to inspect the element.

I was brought here by the below link (about 2/3 of the way down the page, in the emulated-plugins section), thinking I couldn’t use vim-airline with VSCodeVim. It seems this no longer affecting vim-airline, yes? Might be best to remove the disclaimer at the top of the emulated-plugins section

https://marketplace.visualstudio.com/items?itemName=vscodevim.vim#-emulated-plugins

I’d recommend sticking a 👍 on https://github.com/microsoft/vscode/issues/43226 if you want to be able to enable statusbar colours without performance issues.

From my experience it depends on the machine you are using. Maybe it was worse in 2017 regardless of your machine, but it is still an issue.

Does anybody still get this issue on recent versions of VSCodeVim?

FYI, Customize UI no longer works so that option is off the table 😦

I switched to be5invis/vscode-custom-css which still works (though since the CSS is placed in a normal file with it, use \ instead of \\ and " instead of \" above).

It was the vim extension causing the 100% CPU usage issue for me also. Removing any/all “neovim” related settings took care of the problem. Just changing some to a ‘disabled’ value or just commenting out did not work. I had to totally remove then entries.

On Windows 10, the same happens.