30

I am using VSCode for more than a year and never faced this problem. The project I am working on is huge and VSCode is extremely slow when I am working on this project. I tried other projects and they work fine but what's strange is on the same project, a team of 10+ is working and most of them use VSCode but there seems no problem with their VSC.

I have to wait for like 2 minutes on first access to IntelliSense. So every time I open a file, I have to wait for like 2 to 3 minutes before I can see suggestions.

When I open Project, I get these messages, which is totally fine I guess. It's only for the first 10 seconds. Initialization

After initialization is finish, it still keeps loading for the next 2 minutes.

Loading

What I tried: I disabled all my extensions, reinstalled VScode, reinstall Windows (I'm using Windows 10), downgrade to previous version and even change my system but still, nothing works.

System Specs: Core I5 (3rd Gen) with 16GB of Ram and SSD of 500GB

Arsalan Khattak
  • 768
  • 2
  • 8
  • 16
  • If you see this with all extensions disabled, please [file a bug report](https://github.com/microsoft/vscode/issues/new?template=bug_report.md). If possible, include a project that causes this – Matt Bierner Mar 12 '20 at 20:42
  • Try playing with your tsconfig/compiler options, I've had cases where some flags would slow down everything big time on a certain update (just remember to restart VS Code every time). A similar thing goes for linter rules, but you've already noted that you turned off extensions. Additionally, double-check your VS Code settings (both user and workspace), make sure that large directories such as node_modules are excluded from VS Code searching through them – 5ar Mar 18 '20 at 00:13
  • There are so many settings. What should I search for in the command palette to stop VS code from searching node_modules? – Terris Sep 30 '20 at 14:54
  • 6
    Did you ever find a resolution? I'm having this exact same problem on a brand new project, even after removing the node_modules folder. I'm not even using TypeScript in my project, however something is triggering it to load! – James Jan 23 '21 at 00:34

9 Answers9

12

Please delete the .vs folder in your project folder and restart the vscode, now the intellisense will work fine.

Silambarasan N
  • 175
  • 1
  • 5
7

Solution 1: First check if you have any extensions that's unresponsive. Navigate to command palette from Settings(bottom left corner), type in 'Show running extensions' if you find any unresponsive extensions, delete it! Reinstall it if you really need it. An unresponsive extension can significantly slow down your IDE, as a result you will notice that adding/deleting/renaming a file, as well as intellisense taking forever.

Solution 2: Deleting the .vscode folder itself didn't work for me. I also had to do the following by navigating to Preferences -> Settings -> Text Editor -> Suggestions Up here I changed the delay for quick suggestions to 1 milliseconds. I ticked marked on suggest:preview. You might select other options there as per your requirements. Then restarting the VsCode fixed the problem

Junia Montana
  • 443
  • 7
  • 11
  • 1
    Solution 2 is what worked for me. I was also having this issue in Jupyter Notebookes but this helped that as well. – nathan Jun 27 '23 at 13:56
4

As per https://stackoverflow.com/a/69580343/2021554 when you are working with larger files, typically those which exceed 3k lines and have nightly installed you'll see a slight improvement by disabling it.

In addition (as per https://stackoverflow.com/a/69580343/2021554) excluding node_modules is also another performance gain overall which folks should indeed get into a habit of doing.

Excluding node_modules from the file explorer can be done by simply adding it file exclusions within workspace settings:

    {
        "files.exclude": {
          "**/node_modules": true
        }
    }
User_coder
  • 477
  • 1
  • 7
  • 21
2

in my case, it is caused by this extendsion enter image description here

removing it solved the issue

Acid Coder
  • 2,047
  • 15
  • 21
1

add a file to your project folder .vscodeignore and place node_modules inside it and be happy.

Márcio Soares
  • 371
  • 2
  • 3
  • 2
    Not sure why you go downvoted here, though the answer could of been a little bit more detailed. This will indeed improve overall performance and users should get into a habit of excluding node_modules from the file explorer, but instead doing this via workspace settings `files.exclude` option. – User_coder Dec 05 '22 at 23:33
1

In my case, I was using the latest vs code version of v1.69 and it was very slow (~30 second delay on intellisense). I downgraded to v1.64.2 and everything is now quick. I also disabled auto update which is enabled by default.

Computer Spec:

  • Chip: Apple M1 Pro
  • RAM: 32 GB
  • CPU Cores: 10 (8 performance and 2 efficiency)
  • Storage: 500GB
leo
  • 39
  • 4
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/32305854) – Sercan Jul 28 '22 at 14:51
0

There are many good suggestions but I have found that it is usually a combination of many things. From my experience here are some simple things you can do to instantly make it faster:

  1. Add/Push everything go git that is not pushed.
  2. Close your explorer side bar.
  3. Close open files that you are not using.
bryangwin
  • 27
  • 4
0

In my case VScode was slowed down by a type-script file importing a large json file.
Like this: import mockWorkspace from 'src/assets/json/workspace-1.json;

André
  • 1,602
  • 2
  • 12
  • 26
-2

I tried removing extensions, increasing size of memory in settings, reinstalling VSCODE.

What seemed to help me was committing to github. It seems odd, but ...