VS Code Intellisense is extremely slow
Asked Answered
E

9

39

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

Embrey answered 11/3, 2020 at 10:34 Comment(4)
If you see this with all extensions disabled, please file a bug report. If possible, include a project that causes thisPension
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 themLynd
There are so many settings. What should I search for in the command palette to stop VS code from searching node_modules?Piscina
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!Hetzel
C
13

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

Casares answered 29/1, 2021 at 6:3 Comment(4)
This worked for me - I deleted everything that wasn't in gitEichman
Is there something specific in the folder that should be deleted rather than the entire folder?Koerner
no .vs folder in the project, checked with ls -laDelp
do you mean the .vscode folder? This hast just the launch.json and settings.json inside. I don't have a .vs folderSibell
T
12

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

Tildi answered 29/11, 2021 at 21:22 Comment(1)
Solution 2 is what worked for me. I was also having this issue in Jupyter Notebookes but this helped that as well.Hyaena
M
5

As per https://mcmap.net/q/373670/-vs-code-intellisense-is-extremely-slow 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://mcmap.net/q/373670/-vs-code-intellisense-is-extremely-slow) 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
        }
    }
Matsumoto answered 5/12, 2022 at 23:39 Comment(0)
H
4

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

removing it solved the issue

Hellman answered 15/10, 2021 at 5:30 Comment(1)
it seems like it looks for jsconfig/tsconfig file but when it doesn't find it, it gets stuckJailhouse
S
3

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

Seaver answered 3/2, 2021 at 20:17 Comment(1)
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.Matsumoto
A
2

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
Agility answered 22/7, 2022 at 0:48 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewBlackface
P
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.
Plicate answered 4/4, 2023 at 19:50 Comment(0)
H
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;

Hypoacidity answered 25/4, 2023 at 12:38 Comment(0)
A
-3

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 ...

Ambrogino answered 6/4, 2023 at 23:44 Comment(1)
should be a commentHarass

© 2022 - 2024 — McMap. All rights reserved.