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
🌐
Reddit
reddit.com › r/learnpython › why is python (and vscode's terminal) unbelievably slower than doing so directly from cm? this is not a problem on mac for some reason too
r/learnpython on Reddit: Why is python (and vscode's terminal) unbelievably slower than doing so directly from cm? This is not a problem on mac for some reason too
July 4, 2024 -

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 with
python 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?

🌐
GitHub
github.com › microsoft › vscode › issues › 171356
VScode extremely slow with Pylance and Python · Issue #171356 · microsoft/vscode
January 15, 2023 - The last few days it takes more time for long operations such as, getSemanticTokens full / delta, checking and analyzing the python file and it is extremely annoying if you writing code.
Author   Apisteftos
Discussions

VS code python autocompletion very slow - Stack Overflow
I have an issue using python for VS code on windows. The autocompletion and color syntaxing is very slow (more than 153secs). I tried to disable all extensions as mentionned here Visual Studio Code More on stackoverflow.com
🌐 stackoverflow.com
VSCode python debugger incredibly slow / unresponsive / slow repr / spinning icons in "Variables" pane
Messages indicating slow repr ... was slow (took 141.01s) ". I have never seen this message before. The script I am debugging runs fine if I call 'python script_name.py' without debug. ConfigDict object is from ml_collections package. I have used this package for months without any issues. After code has hit a ... More on github.com
🌐 github.com
8
September 21, 2023
python - VS Code Pylance works slow with much delay - Stack Overflow
When I try to use the autocomplete using Pylance it is stuck there for some time and After Some time like 3 ~ 5 seconds the pop up with auto-complete shows up Python Language Server is already set to More on stackoverflow.com
🌐 stackoverflow.com
Python programs slow to start in VS Code terminal - Stack Overflow
When I run any program in the VS Code terminal, the program takes about 20-30 seconds before it starts running. After it starts, it runs at relatively normal speeds. This is new behavior: code I was More on stackoverflow.com
🌐 stackoverflow.com
🌐
Developer Community
developercommunity.visualstudio.com › content › problem › 520528 › python-interpreter-too-slow.html
Python interpreter too slow - Developer Community
Skip to main content · Microsoft · Visual Studio · Sign in · You need to enable JavaScript to run this app · Sorry this browser is no longer supported · Please use any other modern browser like 'Microsoft Edge'
🌐
GitHub
github.com › microsoft › debugpy › issues › 1391
VSCode python debugger incredibly slow / unresponsive / slow repr / spinning icons in "Variables" pane · Issue #1391 · microsoft/debugpy
September 21, 2023 - Messages indicating slow repr computation: "pydevd warning: Computing repr of da (ConfigDict) was slow (took 141.01s) ". I have never seen this message before. The script I am debugging runs fine if I call 'python script_name.py' without debug. ConfigDict object is from ml_collections package. I have used this package for months without any issues. After code has hit a breakpoint, if I try to query any variables by calling 'print(variable_name)' to the debug console, it prints no output.
Author   apmoore499
Find elsewhere
🌐
GitHub
github.com › microsoft › vscode-python › issues › 15265
Python extension very slow to load · Issue #15265 · microsoft/vscode-python
January 29, 2021 - It used to be barley noticeable. Now VS Code is unresponsive for up to 5 minutes with the "Jupyter extension loading..." and "Python extension loading..." and the rotating recursive arrow animation going. Additionally, the whole system slows down during this process.
Author   clayms
🌐
Reddit
reddit.com › r/vscode › python extension slow to load
r/vscode on Reddit: Python extension slow to load
December 5, 2023 -

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?

🌐
DEV Community
dev.to › wesleycheek › make-vs-code-faster-for-python-auto-completion-49p8
Make VS Code Faster for Python Auto-Completion - DEV Community
September 6, 2022 - I've always struggled with how slow Pylance IntelliSense becomes when a project gets large. It turns... Tagged with python, vscode.
🌐
VSCode.one
vscode.one › make-vscode-faster
Here's How to Make VSCode Faster
If you find that some of them are taking over 1000 milliseconds to start, you may want to investigate this further. I recommend this guide by John Papa for speeding up VS Code extensions. His guide involves bundling your extensions with webpack to improve performance.
🌐
Reddit
reddit.com › r/vscode › python intellisense getting slower the further in the file
r/vscode on Reddit: Python intellisense getting slower the further in the file
January 5, 2023 -

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.

🌐
Developer Community
developercommunity.visualstudio.com › content › problem › 706976 › editor-slow-python-almost-unusable-over-150-lines.html
Editor slow - Python - almost unusable over 150 lines
Skip to main content · Microsoft · Visual Studio · Sign in · You need to enable JavaScript to run this app · Sorry this browser is no longer supported · Please use any other modern browser like 'Microsoft Edge'
🌐
GitHub
github.com › microsoft › ptvsd › issues › 2087
vscode python debugger is very slow · Issue #2087 · microsoft/ptvsd
February 18, 2020 - vscode python debugger is very slow#2087 · Copy link · zehongs · opened · on Feb 18, 2020 · Issue body actions · Hi ptvsd team, My code looks like... # ptvsd.tracing(False) function of file-io and some parsing operations # ptvsd.tracing(True)``` By uncommenting ptvsd.tracing(), the script could be 10x faster (from about 50s to 5s).
Author   zehongs
🌐
GitHub
github.com › Microsoft › vscode › issues › 15404
Python code execution speed is slow out of VSCode · Issue #15404 · microsoft/vscode
November 12, 2016 - If I set the value to 1000000, sublime can be completed within 10 seconds, but it is not response on vscode, you can try use the code on vscode ,and hope fix it.think. below is the python code: for i in range(1,1000000,1): print i
Author   github-lwc