Visual Studio Code Intellisense is very slow – Is there anything I can do?

Question:

Edit: Pylance seems to be much better at this and has so far resolved all problems with the previous Python language server from Microsoft.

I’m using VS Code and it’s wonderful is all areas but code completion, where it is usually just too slow to be of any use. This example shows how long intellisense took to to find a local variable, and this is only after it was prompted to do so after I hit ctrl+enter.

enter image description here

I’ve not been able to find a solution to this as of yet, so I am here to ask if anyone else has had a similar issue and ask how they have overcome it.

Answers:

The problem might be with wrong setting configuration.
You might want to make sure these setting are on:

Controls if suggestions should automatically show up while typing

"editor.quickSuggestions": {
  "other": true,
  "comments": false,
  "strings": false
},

Controls the delay in ms after which quick suggestions will show up

"editor.quickSuggestionsDelay": 10,
Answered By: Matan Danos

It turned out it was a particular VS Code extension for me.
Angular Language Service. Disabling this made it lightning quick.

Try this to see if it is a particular extension.

  • Open Command Palette (Ctrl+Shift+P)
  • Type in “Disable all installed extensions”
  • Enable them one by one or in groups and test the intellisense speed
Answered By: MadMac

My answer’s for c++ but still kinda related.

I’m using the C/C++ extension from Microsoft, and when I switched its Intelli Sense Engine setting from Default, with “context-aware results”, to Tag Parser, with “‘fuzzy’ results that are not context-aware”, it immediately started showing IntelliSense options instead of delaying for 5+ seconds.

So maybe check the particular options of your language’s or environment’s extension(s).

Answered By: Andrew

I had the same problem with Python on VS Code. In my case, disabling Jedi for IntelliSence made things faster.

Just set “python.jediEnabled”: false in the options.

As memory is not a problem for me, I also enabled code analysis to keep parser trees in memory: “python.analysis.memory.keepLibraryAst”: true

Answered By: Julio Batista Silva

Open Command Palette (Ctrl+Shift+P)

Command Palette

Select Developer: show running extension

You will get their list of extensions and their reboot time
list

If extension takes more than 500ms to activate there seems to be a problem with it

You can press on right click and stop it

right click

more details…

Answered By: Yoel

Maybe it’s Jedi. I mean its awesome but … Tinkering with Jedi myself on bigger code bases I can confirm that it might be uber slow at times and pretty hard to figure out what the problems are… :/

Solution might be to switch to another language server! The VSCode Python extension has a "Language Server"-setting:

enter image description here

aka python.languageServer.

Pylance is MS own new language server. I just tried it and it all seems a little snappier. As of today this is tagged as Preview. So there might be improvements around the corner.

Answered By: ewerybody

For me, I had installed the Arduino extension.
This was problematic as it thought it should be in use every time I was coding in C++ so it was really slowing down the autocompletes.

I just disabled it for my workspace and everything work really quickly

Answered By: Jonathan

If you’re working with Angular and noticed intellisense slowness in the past days, it could be Angular Language Service with its new Experimental-ivy feature.

You can disable it by opening the extension settings:

Manage Extensions UI

Then disable the Experimental-ivy feature:

Disable ivy


VS Code prompted me to enable it at some point, I enabled and since then intellisense is super slow. By disabling this with the steps above, now it’s fast again.

Prompt Dialog

I had the same problem. Disabling the checkbox for the "Snippets Prevent Quick Suggestions" option in VSCode settings seems to solve the problem of the loading time.

Disable Quick Preview

Answered By: Mauro Antunes

my issue was solved by disabling this extension that was not installed completely

Visual Studio IntelliCode

Answered By: Khaled Kher

Strange solution for me, but disabling then re-enabling all extensions fixed the issue for me.

Answered By: Sam Autrey

None of these solutions worked for me. What worked for me, is that I went to the extension settings and:

  • changed IntelliSense mode to windows-gcc-arm64 (I was selecting different options for this one based on my os, till I found the fastest one)

  • changed IntelliSense update delay from 2000 to 500 (this added a bigger boost, after the first boost from a change in IntelliSense mode)

Answered By: Cat Supreme

Use Below Values in settings.json file

"editor.suggest.snippetsPreventQuickSuggestions": false,
Answered By: Inder Pal Singh

I used git without .gitignore . Add .gitignore and add unnecessary files and directories like virtualenv in that.

Answered By: Darwin

Click the Windows key and R at the same time, then type %temp%, then find .vscode file. Delete it. Happy coding.

Answered By: chala bultum

I had the same issue, I disabled extensions one by one.
Disabling "Live Server (v5.7.9)" extension fixed it for me.

Answered By: Harty911

You could check as previously suggested, to disable some extensions and retry using the reference finder function.

For my case, the Makefile Tools extension (https://marketplace.visualstudio.com/items?itemName=ms-vscode.makefile-tools), minutes after overtaking C/C++ IntelliSense, it just plainly broke over and over.

For me it was the "Multiple clipboards for VSCode" extension, disabling it fixed my issues.

Answered By: xEc

I recently stumbled upon the same issue after factory resetting my computer. My issue was there was a misalignment by workplace Typescript version and the selected typscript of VSCode.

For others using TS.

On the bottom on the blue line, left for "Typescript" there is a Button "{}", it will appear a "Select Version" option, when click on hovering on this button.

Answered By: Ryan