VS Code: Analyzing in the background

Can solve this by either disabling the extension as suggested in previous answers, or excluding large directories (e.g. containing data) from its search path, by adding to your workspace settings an python.workspaceSymbols.exclusionPatterns key, like so:

settings.json:

{
    "python.workspaceSymbols.exclusionPatterns": [
        "**/site-packages/**",
        "your_pattern_or_directory_to_exclude"
    ]
}

See also the vscode extension docs.


I had the same issue; the only solution that worked for me was to open settings.json (ctrl + Shift + P) and change

"python.languageServer": "Microsoft"

to

"python.languageServer": "Pylance"

Then one gets a pop-up that asks whether one wants to reload the window which one should confirm by pressing "OK".

Then everything works normally again (IntelliJ, autocomplete etc).

As @Vasco pointed out in the comments Microsoft is no longer supported as explained in this thread.


High memory usage: https://github.com/Microsoft/python-language-server/issues/832 Jedi is an autocompletion tool for Python that can be used in IDEs/editors. Jedi works. Jedi is fast. It understands all of the basic Python syntax elements including many builtin functions. So you can switch Jedi instead of Python Language Server.

Process:

  1. set "python.jediEnabled": true

  2. disable the Visual Studio IntelliCode plugin

  3. delete the .vscode directory


This seems to have fixed it for me: https://github.com/Microsoft/vscode-python/issues/4990#issuecomment-477628947

You can disable the new Python Language Server by opening settings in VSCode (Ctrl+, ) and set "python.jediEnabled": true. Then reload the window and/or restart VSCode.