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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU ran into 200%+ in VSCode 1.18.0 #2124

Closed
gonghao opened this issue Nov 9, 2017 · 25 comments
Closed

CPU ran into 200%+ in VSCode 1.18.0 #2124

gonghao opened this issue Nov 9, 2017 · 25 comments

Comments

@gonghao
Copy link

@gonghao gonghao commented Nov 9, 2017

  • 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
@francescarpi
Copy link

@francescarpi francescarpi commented Nov 9, 2017

On Windows 10, the same happens.

@ivanvoznyakovsky
Copy link

@ivanvoznyakovsky ivanvoznyakovsky commented Nov 9, 2017

Same on High Sierra 10.13. Opening a file creates 2 CodeHelper processes with 100%+ CPU usage.

@MythicalFish
Copy link

@MythicalFish MythicalFish commented Nov 9, 2017

Yep. Same on High Sierra, also on VSCode Insiders

@stevestmartin
Copy link

@stevestmartin stevestmartin commented Nov 9, 2017

Same occurs on macOS 10.12.6

@colbell
Copy link

@colbell colbell commented Nov 10, 2017

I've got the same problem on Ubuntu 17.10.

I disabled "Easy motion", I.E added "vim.easymotion": false, to the user settings file, restarted VS Code and opened a Ruby source file. Once the "indexing ruby source" finishes the CPU dropped away.

So it looks like an issue with "Easy Motion".

Ignore the above. It hasn't fixed it. The CPU stays down until you start moving the cursor around in the source file, once you do that the CPU rises again and stays up.

Last Attempt

I open the User settings and quit VS Code. Then start it up again, open my Ruby source file and start editing, everything is fine, CPU is low. Play around for a while, quit and restart. Now the problem starts again.

It seems that if VS Code has a source file active when it starts up then the problem occurs but if you start it up with the user settings as the active pane and then open a source file you are ok.

Can anybody else confirm this behaviour or am I going slightly crazy- its been a long day.

@stevestmartin
Copy link

@stevestmartin stevestmartin commented Nov 10, 2017

@colbell confirmed, if I open it with any source file active even a blank one CPU usage spikes, if i open the user settings tab and relaunch CPU is low. I can consistently reproduce this, switching to a source code tab after launch, or having source code tabs open (regardless of tab order) at launch CPU still remains low, it seems this occurs only when a source code based tab has focus on launch.

@ivanvoznyakovsky
Copy link

@ivanvoznyakovsky ivanvoznyakovsky commented Nov 10, 2017

I have my CPU going crazy whenever a file is focused or vscode is re-open with a prev file opened. once I have any file opened CPU usage spikes.

@adamwiggall
Copy link

@adamwiggall adamwiggall commented Nov 10, 2017

Same for me on Sierra 10.12.6, running VS code 1.18.0.

@jondot
Copy link

@jondot jondot commented Nov 10, 2017

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!

@stevestmartin
Copy link

@stevestmartin stevestmartin commented Nov 10, 2017

Disabling custom status bar colors corrected the problem for me also.

@gonghao
Copy link
Author

@gonghao gonghao commented Nov 10, 2017

@jondot Great job! I just disabled the customize status bar colors, everything goes well!

@colbell
Copy link

@colbell colbell commented Nov 10, 2017

Nice one @jondot disabling the colours fixed it for me too.

@ivanvoznyakovsky
Copy link

@ivanvoznyakovsky ivanvoznyakovsky commented Nov 11, 2017

confirm that "vim.statusBarColorControl": false fixes the issue. great catch @jondot 馃憤
don't think it's a real fix but rather a workaround 馃槃

@chasestarr
Copy link

@chasestarr chasestarr commented Nov 11, 2017

I can reproduce consistently on Version 1.18.

Just tested in Version 1.19.0-insider 11-11-17 on MacOS Sierra 10.12.5 and cannot reproduce CPU spike.

@MythicalFish can you still repro? I can't find a PR relevant to this issue landing in vscode from the past few days - which I find strange https://github.com/Microsoft/vscode/pulls?utf8=%E2%9C%93&q=is%3Apr%20is%3Aclosed%20closed%3A%3E2017-11-07

@samumist
Copy link

@samumist samumist commented Nov 12, 2017

same for me on macOS 10.11.6 and vscode 1.18.

@newro
Copy link

@newro newro commented Nov 14, 2017

I am experiencing a phenomenon that the CPU becomes higher after vscode 1.18 update in the Win10 environment.
The code helper process is using a high CPU, and disabling the vim plugin disables the symptom.

@sc0ttwad3
Copy link

@sc0ttwad3 sc0ttwad3 commented Dec 3, 2017

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.

@Chillee
Copy link
Member

@Chillee Chillee commented Mar 8, 2018

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

@bas72
Copy link

@bas72 bas72 commented Mar 27, 2018

I still experienced this issue in 1.21.1 and for me it was fixed by commenting out the "vim.disableAnnoyingNeovimMessage" setting.

@jpoon
Copy link
Member

@jpoon jpoon commented Mar 27, 2018

@stevebasford that setting is deprecated, it was removed awhile ago. Closing this issue as it seems resolved.

@ChasKane
Copy link

@ChasKane ChasKane commented Jun 7, 2019

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

@xelaos
Copy link

@xelaos xelaos commented Jul 2, 2019

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.

@andyearnshaw
Copy link

@andyearnshaw andyearnshaw commented Mar 2, 2020

I'd recommend sticking a 馃憤 on microsoft/vscode#43226 if you want to be able to enable statusbar colours without performance issues.

@nzig
Copy link

@nzig nzig commented Feb 7, 2021

@The-Compiler
Copy link

@The-Compiler The-Compiler commented May 20, 2021

@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[aria-label=\"-- INSERT --\"]": "background-color: #98971a !important;",
        "#vscodevim\\.vim[aria-label=\"-- VISUAL --\"]": "background-color: #b16286 !important;",
        "#vscodevim\\.vim[aria-label^=\":\"]": "background-color: #7c6f64 !important;",
    },

result:

image

image

image

image

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

Successfully merging a pull request may close this issue.

None yet