-
Notifications
You must be signed in to change notification settings - Fork 38.1k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugeditor-coreEditor basic functionalityEditor basic functionalityperf
Milestone
Description
- VSCode Version: 1.10.2 (8076a19)
- OS Version: macOS Sierra 10.12.3
VS Code uses 13% CPU when focused and idle, draining battery. This is likely due to the blinking cursor rendering. I think CPU usage when focused-and-idle could ideally be near-0%.
To reproduce (this works with an empty settings file and all plugins disabled):
- Close all VS Code windows.
- Open a new window (File -> New Window). It will show the Welcome page.
- Open a new tab with an empty untitled file (File -> New Tab). The cursor is blinking.
- You should see VS Code consuming a non-negligible amount of CPU -- 13% on my 13" MacBook Pro.
- Cmd+Tab into some other application. Now the cursor isn't visible anymore.
- You should see VS Code consuming virtually no CPU.
I recorded a Timeline in the Developer Tools, and a cursory look suggests that the CPU activity comes from rendering the blinking cursor every 500ms.
Other macOS applications like Chrome or TextEdit show a blinking cursor without consuming much CPU, so I think this could surely be optimized away.
Reactions are currently unavailable
Metadata
Metadata
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugeditor-coreEditor basic functionalityEditor basic functionalityperf