Aviral Goel
Aviral Goel

Reputation: 65

Why Visual Studio Code slows down my Laptop?

Recently, I was having a computer which ran Windows 7 32-bit and with 2gb RAM. Visual Studio Code ran very well on that pc but now I have purchased a new Laptop which runs Windows 10 64-bit and with 4gb RAM and when recently I installed VS Code, starting few days it ran properly but after some days my laptop's performance slowed down and when I uninstalled VS Code, my laptop became normal. So, I think that VS Code slowed down my laptop. So, can I get a solution to this problem?

Edit: and my vs code also slows down after some days.

Upvotes: 2

Views: 14394

Answers (4)

WitnessTruth
WitnessTruth

Reputation: 579

Try to start VS Code by using --disable-renderer-accessibility option in your terminal.

code  --disable-renderer-accessibility

If this works, I recommend you to add --disable-renderer-accessibility parameter in the final of "Target" field in your VS Code shortcut configuration.

It solved for me with an Intel Core i7 8650U equipped with an Intel UHD Graphics 620 + GeForce MX130

Upvotes: 1

Anton Krug
Anton Krug

Reputation: 1781

after some days my laptop's performance slowed down and when I uninstalled VS Code, my laptop became normal.

Are you implying that it was slowing down the computer even when it was not running? Wasn't it enough to not run it to not have the slowdown?

So I'm not 100% sure what you described is correct, there might be other aspects to this problem (extensions installed, projects opened etc...), here are few things which crossed my mind.

There were some for the code IntelliSense, but there were some problems of watching such a huge amount of files for any changes. I think when it reaches the limit of the OS (on Linux I had to increases the inotify limit), after going over the limit then it resorts to doing manual polling which is very heavy.

The type acquisition can be tweaked by adding this into the settings.json:

{
  "typescript.disableAutomaticTypeAcquisition": true
}

Reference: https://radhika.dev/vsc/

Mine VS code was very slow when I opened huge project with large amount of files. So your performance might depend on what projects you work on.

You can do few tweaks like disabling telemetry to make it slightly less heavy:

https://dev.to/claudiodavi/reducing-vscode-memory-consumption-527k

Be careful what extensions you install:

https://www.freecodecamp.org/news/optimize-vscode-performance-best-extensions/

You could try Insiders build with all the extensions disabled:

https://code.visualstudio.com/insiders/

You can do a lot to track the cause of culprits:

https://github.com/Microsoft/vscode/wiki/Performance-Issues

Deleting the .vs folder helped some users:

VS Code Intellisense is extremely slow

Upvotes: 2

Dhananjay
Dhananjay

Reputation: 36

If you are using extension of AutoComplete AI Code like (Kite,Tabnine) these extension stores data, which eventiually becomes heavy for processing and makes vs code slow.

Upvotes: 1

Amitoj Singh
Amitoj Singh

Reputation: 59

This is probably due to the fact that VSCode is built on Electron (which technically makes it a web app) that uses the Chromium engine (known to eat up a lot of resources). You could probably also have a bad acting extension, to make sure try uninstalling all extensions from your VSCode install and see if the problem persists

Upvotes: 1

Related Questions