Repository: vscode
Issue: High CPU usage on Linux VM as of version 1.90.1
Labels: info-needed

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->

- VS Code Version: 1.90.1
- OS Version: Red Hat Enterprise Linux 8.10 (Ootpa)

Steps to Reproduce:

Simply opening code causes extremely high CPU usage as of the 1.90.1 release:

`code -n --disable-extensions`

More info:

Recently we have noticed a huge spike in CPU usage at work when running VSCode in our linux VMs, and we think we traced it back to a change between version 1.89 and 1.90.

When I look at the command line that is causing the huge CPU usage using the 'top' utility, I see this:

`/usr/share/code/code --type=gpu-process --crashpad-handler-pid=1689541 --enable-crash-reporter=ca065032-324e-4c32-a72f-fb887114115c,no_channel --user-data-dir=/home/<redacted user name>/.config/Code --gpu-preferences=WAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAABgAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --shared-files --field-trial-handle=0,i,10457224120802378877,8861068434942188052,262144 --enable-features=kWebSQLAccess --disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess --variations-seed-version`

the "type==gpu-process" flag got me thinking that perhaps something changed between version 1.89 and 1.90 in the way GPU rendering works. Sure enough, the change log shows this:

https://code.visualstudio.com/updates/v1_90#_terminal

> ⚠️ Removal of the canvas renderer
> 
> The canvas renderer was deprecated in the VS Code 1.89 release and is now removed completely. This means that on the small number of machines that do not support WebGL2, the terminal now uses the DOM-based renderer. You can read more about GPU acceleration in the terminal documentation.

clicking through further to https://code.visualstudio.com/docs/terminal/appearance#_gpu-acceleration:

> GPU acceleration
> 
> The terminal features two different renderers, each of which have different trade offs:
> 
> - WebGL renderer - True GPU acceleration.
> - DOM renderer - A fallback renderer that's much slower but has great compatibility.
> 
> GPU acceleration driven by the WebGL renderer is enabled in the terminal by default. This helps the terminal work faster and display at a high FPS by significantly reducing the time the CPU spends rendering each frame.
> 
> The default terminal.integrated.gpuAcceleration value of "auto" tries the WebGL renderer and if it failed will fall back to the DOM renderer. When on Linux VMs, browsers that don't support WebGL, or machines with outdated drivers, WebGL may not work properly.

This makes me think that maybe code is falling back to the DOM renderer and that's causing the high CPU usage. However, I have no idea how to confirm that. Is there any troubleshooting step to prove that my system isn't supporting WebGL properly?

Also, I tried opening code with the --disable-gpu flag - this didn't help at all.

It's also possible I am barking up the wrong tree regarding WebGl vs DOM.  Looking for any assistance to get this fixed.