Live data from Hacker News

VS Code uses 13% CPU when idle due to blinking cursor rendering

github.com

1–10 of 801 posts

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#3
post #2

TL;DR: It seems to be a problem in Chromium, the relevant CSS (one second change) results in a 60hz animation cycle. Workaround: "editor.cursorBlinking": "solid"

You think this is gonna be fixed in Chromium, fixed in VSCode, or working-as-designed?

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#6
Sounds like this can be fixed by moving away from animating opacity to something more rudimentary like flipping the display property in JS. CSS3 animations from my experience are a bit taxing in general, and something you want to use only in small bursts, not constantly running in the background.

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#7
post #2

TL;DR: It seems to be a problem in Chromium, the relevant CSS (one second change) results in a 60hz animation cycle. Workaround: "editor.cursorBlinking": "solid"

Okay, but checking at 60 hz if an animation needs to be updated is not relevant work. In no universe should that cause 13% processor load.

Sure maybe you can get smarter and realize that all animations run at 2 hz and then also only check at 2 hz, but it seems the root problem here is an entirely different one.

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#8
post #2

TL;DR: It seems to be a problem in Chromium, the relevant CSS (one second change) results in a 60hz animation cycle. Workaround: "editor.cursorBlinking": "solid"

You think this is gonna be fixed in Chromium, fixed in VSCode, or working-as-designed?

Issues/bugs are filed, see https://github.com/Microsoft/vscode/issues/22900#issuecommen...
Post reply on HN