Discussed in #20517
Originally posted by ThomasEwaldETH January 16, 2023
Hello there!
Since of today, my Python extension in Visual Studio Code maxes out my CPU. I recently had this issue (maybe a week ago), where I could solve it with
https://stackoverflow.com/questions/71516186/vs-code-uses-100-cpu-even-if-it-is-closed
It worked for a couple of days now. However, as of today, I am quickly again at 100% CPU. Here a couple of things I recognized so far:
- When I start VSC, a Python sub process is generated, which takes up about 25-40% of CPU. This sub process does not get terminated. When it is active, the extension does not work properly, meaning that for example linting does not work. If I terminate it manually, linting immediately works. After terminating, VSC goes down to 0% CPU usage.
- The moment I press 'save' (strg+s) in an arbitrary file in my Python project folder, two sub processes are created: One also taking up 25-40%, the other one quickly going down to zero, but doesn't get terminated. In addition, all linting highlights are gone and the linting seems to not work anymore.
- If I press 'save' a second time (no matter which file I'm in), two new sub processes are created. Again, one quickly falling down to zero, the other one taking up another 25-40% of CPU -> consequently, if I press 'save' four times, my CPU is maxed out.
- If I terminate the CPU draining sub processes, the 'dead' ones with 0% CPU seem to get terminated after a short while.
- I have ALWAYS two 0% CPU sub processes running that are named 'Python'.
In the following a couple of snippets from my Task Manager:

Here, the CPU usage after starting VSC, where the project folder is opened automatically.

Terminated the first sub process manually - remaining two 0% sub processes.

Hit 'save' a single time.

Hit 'save' a second time. And so on...
I am using Win11, about my VSC:
Version: 1.74.3 (user setup)
Commit: 97dec172d3256f8ca4bfb2143f3f76b503ca0534
Date: 2023-01-09T16:59:02.252Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No
I am completely out of ideas on how to get this fixed, since it just appeared out of nowhere today. Maybe someone here has an idea. Searching with Google didn't provide a lot, aside from what I linked above.
I would be grateful for help!
Best regards,
Thomas
Discussed in #20517
Originally posted by ThomasEwaldETH January 16, 2023
Hello there!
Since of today, my Python extension in Visual Studio Code maxes out my CPU. I recently had this issue (maybe a week ago), where I could solve it with
https://stackoverflow.com/questions/71516186/vs-code-uses-100-cpu-even-if-it-is-closed
It worked for a couple of days now. However, as of today, I am quickly again at 100% CPU. Here a couple of things I recognized so far:
In the following a couple of snippets from my Task Manager:
Here, the CPU usage after starting VSC, where the project folder is opened automatically.
Terminated the first sub process manually - remaining two 0% sub processes.
Hit 'save' a single time.
Hit 'save' a second time. And so on...
I am using Win11, about my VSC:
Version: 1.74.3 (user setup)
Commit: 97dec172d3256f8ca4bfb2143f3f76b503ca0534
Date: 2023-01-09T16:59:02.252Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No
I am completely out of ideas on how to get this fixed, since it just appeared out of nowhere today. Maybe someone here has an idea. Searching with Google didn't provide a lot, aside from what I linked above.
I would be grateful for help!
Best regards,
Thomas