I'm on the VS code team.
There are many possible causes for high memory usage. We've put together tools and a guide that can help you investigate potential performance issues.
Start by using the process explorer. The process explorer shows the cpu and memory usage per child process of VS Code. Open it with the Open process explorer command. The process explorer should help you track down which processes are using the most memory. Often times, an extension will turn out to be the root cause

Also, even though you have only opened eight files, your workspace seems to be quite a bit larger than just those eight. Providing intellisense and other advanced editor features often requires processing many unopened files as well. Whether or not the 2-3gb is justified or not is hard to say without understanding what extensions you are using and what your workspace contains.
I recommend that you also take a look through the rest of our performance issue guide. It explains how to report performance issues and further investigate performance problems.
Answer from Matt Bierner on Stack OverflowI'm on the VS code team.
There are many possible causes for high memory usage. We've put together tools and a guide that can help you investigate potential performance issues.
Start by using the process explorer. The process explorer shows the cpu and memory usage per child process of VS Code. Open it with the Open process explorer command. The process explorer should help you track down which processes are using the most memory. Often times, an extension will turn out to be the root cause

Also, even though you have only opened eight files, your workspace seems to be quite a bit larger than just those eight. Providing intellisense and other advanced editor features often requires processing many unopened files as well. Whether or not the 2-3gb is justified or not is hard to say without understanding what extensions you are using and what your workspace contains.
I recommend that you also take a look through the rest of our performance issue guide. It explains how to report performance issues and further investigate performance problems.
You could prevent vscode from watching folders with really many files in you project by adding this to your json settings file
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/node_modules/**": true
}
VS Code high memory usage and slow performance
Many processes and high memory usage in VSCode
it's normal that vscode taking 60-70% of my Memory and CPU ?
Excessive memory usage (7GB+) with multiple code processes on Linux
Videos
I have 16GB of RAM on my machine. When I start it and only open Vscode with two tabs for the frontend and backend repositories, it takes up most of my RAM and CPU. If I try to open another program, such as my browser, my PC becomes very laggy.
I have no idea what it's doing. Note, after a few more minutes, it went up to three. I might've found a memory leak, but bc vs code is written in js and electron, I doubt it.
The visual studio is lighter than this.
I understand that using neat features like the microsoft python language server or the intellisense plugins require a lot of memory for processing my code... but sometimes the usage is so intense that actually ends up blocking my workflow.
Is there a way to reduce the RAM usage? Like a hotkey for switching to a lightweight workspace not so cruel with my resources?
I'd really hate to have to switch back to a more lightweight editor because of this... vscode is now my favourite tool for everything.