Why does VS Code require so much memory? How can I make it run more memory-efficiently?

后端 未结 5 2038
旧时难觅i
旧时难觅i 2020-12-13 17:29

Does anyone know how to make VS Code use less memory?

It´s taking more than 2gb, sometimes more than 3 gigabytes to have some 8 files opened.

5条回答
  •  不知归路
    2020-12-13 18:00

    Check if your extensions are causing the bad things

    I have used the guide https://github.com/Microsoft/vscode/wiki/Performance-Issues#profile-the-running-extensions

    to know why VS Code was

    • very slow to startup
    • taking much ram (3-4 gb)

    You can create a CPU profile and share it in the issue with the extension author or us. To create a CPU profile:

    • Close all instances of VSCode and start with code --inspect-extensions=9993 or any other port number.
    • Execute the Developer: Show Running Extensions Command. This command opens an editor with all the running extensions. To start recording a profile

    I found some extension with high delays and they were marked with unresponsive yellow triangle. I disabled them using right click context menu, restarted VS Code, and after that it

    • Takes only a few seconds to startup
    • Takes only ~250mb of ram

提交回复
热议问题