Code change:
Issue Type: <bPerformance Issue</bTerminals doesn't seem to free all GPU memory when closing them, making alt-tabbing from another application to vscode slower over time, there are other tickets around vscode freezing when alt-tabbing back to it and this seems to be one of the reasons as Windows needs to load/unload 1GB+ of GPU memory when alt-tabbing occurs. One way of reproducing this: 20 integrated terminals the terminals again (now only welcome screen open) Windows task manager -Performance tab something covers vscode completely (i.e. task manager is maximized) the GPU memory usage is 500MB+ lower than if vscode is visible (i.e. task manager is not maximized so it doesn't cover vscode completely, forcing Windows to keep vscode GPU memory active). scales linearly if you open more terminals, i.e. 40 terminals keeps 1GB+ of GPU memory even when they are closed I can reproduce it on the insiders build as well, so Electron 18 doesn't seem to solve this issue. vscode visible (2 GB GPU memory usage at the bottom of the screenshot): ! vscode still open but behind other windows (1 GB GPU memory usage at the bottom of the screenshot): ! VS Code version: Code 1.68.1 (, 2022-06-14T12:48:58.283Z) OS version: WindowsNT x64 10.0. Restricted Mode: No Remote OS version: Linux x64 5.10.102.1-microsoft-standard-WSL2 <details<summarySystem Info</summary </details<!-- generated by issue reporter --
I tried to repro with stable, but I wasn't able to. What are the steps for verification?
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
Hello, I'm waiting for these to cleanup the terminals properly: But as I am the author of those PRs I don't think additional verification is needed from me once they get merged.
fyi I think I noticed a few bugs about alt-tabbing being slow

Related discussion:
text: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-7.0.1.tgz#8118a32b02735dccd14f893b495fa5389ad7de79" integrity sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw== <del> xterm-addon-search@0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0.tgz#95278ebb818cfcf882209ae75be96e0bea5d52a5" integrity sha512-aoolI8YuHvdGw+Qjg8g2M4kst0v86GtB7WeBm4F0jNXA005/6QbWWy9eCsvnIDLJOFI5JSSrZnD6CaOkvBQYPA== </del> <ins> xterm-addon-search@0.10.0-beta.1: version "0.10.0-beta.1" resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.10.0-beta.1.tgz#ee15b954b6f78585cd3a212ec662018263470266" integrity sha512-rp68SwoYHIQ1SY4MoILNK+0HcN8OR4hzczHOYCFdeKYZFvH/16vgqg0OJT6t6WlL1cq971rLsEDXT1SKcpoJqA== </ins> xterm-addon-unicode11@0.4.0-beta.3: version "0.4.0-beta.3" resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.3.tgz#f350184155fafd5ad0d6fbf31d13e6ca7dea1efa" integrity sha512-FryZAVwbUjKTmwXnm1trch/2XO60F5JsDvOkZhzobV1hm10sFLVuZpFyHXiUx7TFeeFsvNP+S77LAtWoeT5z+Q== <del> xterm-addon-webgl@0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0.tgz#2fba8d31890a122adafa1c2fb945482e2ae12973" integrity sha512-3P5ihdjPnxH6Wrvqjki9UD+duoVrp1fvnO/pSpXP2F1L2GwY6TDNExgj8Yg141vMCNgQbcVqmsTLYEYZxjY92A== </del> <ins> xterm-addon-webgl@0.13.0-beta.2: version "0.13.0-beta.2" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0-beta.2.tgz#f58a7a3641ad7c8ac82dd24cfb0165656ed9ac1c" integrity sha512-98tX0BkpD402RoCO6SyikUXpzCn9/OQhlXsRmM/kRFCxMWWofStWTXzCPhN0MjIx2IdGueDjCmnShhidwihErg== </ins> <del> xterm@4.19.0: version "4.19.0" resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.19.0.tgz#c0f9d09cd61de1d658f43ca75f992197add9ef6d" integrity sha512-c3Cp4eOVsYY5Q839dR5IejghRPpxciGmLWWaP9g+ppfMeBChMeLa1DCA+pmX/jyDZ+zxFOmlJL/82qVdayVoGQ== </del> <ins> xterm@4.20.0-beta.5: version "4.20.0-beta.5" resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.20.0-beta.5.tgz#d707b0dcb477a554135fb767b24003fced079866" integrity sha512-KBWfk9UPBKRy662DVGGTZEcW1becEjYvlyWbn2hLj9h2gy6Q4EEEEbggJh8I7SGwdFizl+apHQGhEOZmFCA70w== </ins>