Visual Studio Code Intellisense is very slow - Is there anything I can do?
PythonVisual Studio-CodeIntellisenseCode CompletionPython Problem Overview
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.
Python Solutions
Solution 1 - Python
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
Solution 2 - Python
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,
Solution 3 - Python
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.
Solution 4 - Python
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).
Solution 5 - Python
Open Command Palette (Ctrl
+Shift
+P
)
Select Developer: show running extension
You will get their list of extensions and their reboot time
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
Solution 6 - Python
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
Solution 7 - Python
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.
Solution 8 - Python
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.
Solution 9 - Python
my issue was solved by disabling this extension that was not installed completely
> Visual Studio IntelliCode
Solution 10 - Python
Strange solution for me, but disabling then re-enabling all extensions fixed the issue for me.
Solution 11 - Python
Use Below Values in settings.json file
"editor.suggest.snippetsPreventQuickSuggestions": false,
Solution 12 - Python
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
Solution 13 - Python
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)