microsoft / microsoft/vscode

Option to not keep inactive tabs in memory

Open
#330,366 1 comment 0 reactions 1 assignee Claimed by @benibenj View on GitHub
feature-request performance workbench-editors
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

I tend to keep dozens of projects and files open. VS Code uses around 30-300MB per open file. My process viewer on Mac shows a lot of Code Helper (Renderer) and Code Helper (Plugin) processes, around 80 in total. It regularly adds up to 10-15GB of RAM used.

What I'd like to have is a settings option to only maintain background tabs in memory if they have a recent history (or just retain the history in memory), otherwise keep a tab placeholder, close the file and open it again from disk when the tab is made visible. Scroll position per tab would be retained.

Project windows that have been idle for a while can have all files closed and only have tab placeholders. No matter how many projects or files are open, the editor would only need to retain a few files and changes in memory. This should be less than 2GB RAM.

The option can be for how many recently used files to retain in memory. 0 would be the default and unlimited, which is the current setup. 1 would be to store only the currently focused file and reload when switching file (scroll position would be retained for a tab). Change/undo history is likely small so can be retained.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.