2

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.

Aviral Goel
  • 55
  • 1
  • 1
  • 9
  • Your laptop is underpowered, plain and simple. Any new computer you buy in 2021 to do any real development work in Windows 10 should be equipped with a minimum 8 GB of RAM, an I5 processor (preferably I7 or better) and a solid state drive (SSD). – Robert Harvey Oct 21 '21 at 13:42
  • @Robert Even 8 GB might be too little when anyone on the Zoom call screen shares VS Code, as I have painfully learned... – Alonso del Arte Jan 26 '22 at 21:19

4 Answers4

2

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

Anton Krug
  • 1,555
  • 2
  • 19
  • 32
  • yeah, it slowed the computer even when it was not open, BTW Thanks for info – Aviral Goel May 28 '21 at 05:34
  • That is bizarre, was it maybe stuck running in a background/crashed running without showing in the taskbar. If you will give vscode second chance, monitor the task manager and its processes and not just the task bar. I'm not aware of any background services installed by vscode, so I think a crashed/stuck editor is the most reasonable explanation. – Anton Krug May 28 '21 at 13:00
1

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

Amitoj Singh
  • 59
  • 1
  • 3
1

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.

Dhananjay
  • 26
  • 6
  • No, I tried these extensions first but they slowed my editor. So, I am not using any kind of extensions like this from 2 months. BTW thanks for info! – Aviral Goel May 27 '21 at 07:13
  • have you clean up your temp folder in your appdata? – Dhananjay May 27 '21 at 07:18
  • If not done it yet press **Ctrl+r** then type **%temp%** and delete all file if some of the is not deleting than skip for that. – Dhananjay May 27 '21 at 07:21
  • That opens a folder in C//AppData and it has a lot of files, I fear that I do not delete any useful file. – Aviral Goel Jun 08 '21 at 12:38
  • Hey, I think that VS Code has installed Jedi. I think that's the source for the slow down. Please tell me how to uninstall it. – Aviral Goel Jun 08 '21 at 12:46
1

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

WitnessTruth
  • 539
  • 2
  • 9
  • 27