2

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 Intellisense is very slow - Is there anything I can do? but without any improvement. My python file is very small (60 lines).

[Info  - 13:49:36] (32004) [IDX(2)] Long operation: index libraries c:\Users\XXX\XXX.py (2089ms)
[Info  - 13:49:36] (32004) Indexer done(2). indexed 504 files
[Info  - 13:52:07] (32004) [BG(1)] Long operation: getSemanticTokens full at c:\Users\XXX\XXX.py (153210ms)
[Info  - 13:53:43] (32004) [FG] Long operation: completion at c:\Users\XXX\XXX.py:33:12 (5334ms)

Any tips to trouble shoot my issue?

Edit:

  • Python 3.10.1 - 64bits
  • Pylance V2022.2.1
  • VScode 1.64.2
  • Windows 10
Thombou
  • 367
  • 2
  • 15

1 Answers1

4

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.

  • 1
    Thanks, that seems to work for me (at least at a first glance) . I see that V 2022.2.0 has been released one week ago. Maybe that's related to this change – Thombou Feb 17 '22 at 12:07
  • 1
    Yeah, ultimately it was not this solution. There was a problem with launching code in a folder from my terminal. I created an issue : https://github.com/microsoft/vscode-python/issues/18539 and the solution proposed to switch to insiders was good, no more problems. The patch should be up in the next version of python extension. – lilithabaddon Feb 18 '22 at 15:56