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.
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,
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
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).
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
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:
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.
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
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:
Then disable the Experimental-ivy feature:
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.
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.
my issue was solved by disabling this extension that was not installed completely
Visual Studio IntelliCode
Strange solution for me, but disabling then re-enabling all extensions fixed the issue for me.
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)
Use Below Values in settings.json file
"editor.suggest.snippetsPreventQuickSuggestions": false,
I used git without .gitignor
e . Add .gitignore
and add unnecessary files and directories like virtualenv in that.
Click the Windows key and R at the same time, then type %temp%, then find .vscode file. Delete it. Happy coding.
I had the same issue, I disabled extensions one by one.
Disabling "Live Server (v5.7.9)" extension fixed it for me.
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.
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.
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.
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.
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,
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
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).
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
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:
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.
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
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:
Then disable the Experimental-ivy feature:
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.
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.
my issue was solved by disabling this extension that was not installed completely
Visual Studio IntelliCode
Strange solution for me, but disabling then re-enabling all extensions fixed the issue for me.
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)
Use Below Values in settings.json file
"editor.suggest.snippetsPreventQuickSuggestions": false,
I used git without .gitignor
e . Add .gitignore
and add unnecessary files and directories like virtualenv in that.
Click the Windows key and R at the same time, then type %temp%, then find .vscode file. Delete it. Happy coding.
I had the same issue, I disabled extensions one by one.
Disabling "Live Server (v5.7.9)" extension fixed it for me.
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.
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.