I a similar problem yesterday and tried to reinstall VSCode but pylance was still super slow (normal on start but slower and slower).
This morning, I tried to install an older version of PyLance extension (v2022.1.5) and it seems that now it works properly.
Answer from lilithabaddon on Stack Overflow
More particularly, python is only excruciatingly slow when ran in vscode's terminal for some reason, also vscode's terminal boots up very slowly too, but when python code is ran withpython main.py
it only takes a fraction of a second to finish the code. Also worth mentioning is that on mac, vscode terminal is completely normal and quick
For context: hello world takes around 5 seconds on my machine to execute, but takes a fraction of a second when ran directly from cmd, not vscode
Why is this happening? Is it possible to optimise vscode for faster python running time?
VS code python autocompletion very slow - Stack Overflow
VSCode python debugger incredibly slow / unresponsive / slow repr / spinning icons in "Variables" pane
python - VS Code Pylance works slow with much delay - Stack Overflow
Python programs slow to start in VS Code terminal - Stack Overflow
Videos
It works well on my computer, how do you open this python file?
Try moving your code to its own folder and opening that up instead of opening up some big folder that contains a lot of files. This does show a performance hole where large workspaces take a while to load.
You can refer to this page for more details.
I was working with 2025.2.1 and noticed a huge slowdown and it didn't matter how big the project was. It was very odd as it would autocomplete very fast outside of a function, but then take a few seconds within a function after an arbitrary line of code.
I rolled back to 2024.10.1 and it is blazing fast again for autocomplete even on my large project with tens of thousands of lines of code.
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
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,
I'm just wondering if this is something that anyone else has noticed, sometimes I'll get python completions fine and sometimes I'm expecting there to be a popup for a variable and it just doesn't happen to i end up typing it myself.
Recently updated my laptop, and after installing VS Code and Python on the new machine, I've noticed that the Python extension takes forever to load any time VS Code is (re)started. I haven't timed it exactly, but probably at least a minute or more, just to load an extension on a 'gaming' laptop with oodles (technical term!) of RAM, disk space, and processor power to spare.
Nothing particularly exotic as far as extensions loaded - Python (obviously), Pylance, Jupyter, Remote - WSL, Vim, Visual Studio Intellicode and vs-code icons. Even with everything disabled but Python, Pylance and Jupyter, it doesn't change - and the extension very obviously holding things up is the Python one.
Nothing too exotic about the Python install... vanilla 3.8.6, from python.org, using virtualenvs for development. Even with the base install, and nothing much beyond pylint, black and virtualenvwrapper-win installed via pip... this seems really, really, really odd.
Any ideas?
It seems that the further I go in a file the slower the code completion becomes and I don't know if this is how it's supposed to be or not.
So far I've removed all the extensions leaving only Python related ones, reinstalled VSC, and changed the python language server to jedi and pylance.