Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 864  / 2 Years ago, mon, march 28, 2022, 10:36:48

python3 running over 120.9% of CPU (screenshot)


I don't know why all of a sudden python3 decided to run over 120.9% of CPU but I'm facing this problem since last week and I still couldn't find out the solution.


I don't know why I can't find any application that is written in Python and that requires this much of CPU usage, as you can see clearly in that screenshot that only python3 interpreter is using way too much of CPU.


I can't delete python3, if I do so I will crash my system, please post a solution to this problem.


I tried to find out the application that python3's interpreter was running using the solution given by WinEunuuchs2Unix and found out that it was Visual Studio Code jedi language server that was using this much of CPU.


enter image description here


Now help me to find out how to disable jedi language server support on Visual Studio Code (if there is nothing you can do with the CPU usage).


More From » 14.04

 Answers
5

The solution to this problem as suggested by a user Iuabud at Rouge Python Processes with High CPU ...


Note: The steps I'm mentioning are only applicable if python's run-jedi-language-server.py is consuming a lot of CPU in your system.



  1. Open the command palette (View > Command Palette...) or Ctrl + Shift + P.

  2. Run the "Preferences: Open Settings (JSON)" command. This will open the user
    settings in VS code. You don't want to open defaultSettings.json open
    setting.json
    .

  3. Paste the following line in the settings file:
    "python.experiments.optOutFrom": ["pythonJediLSP"] and save the file.

  4. Reload the window (either by closing VS Code and opening it again or running
    the "Developer: Reload Window" command from the command palette),

    Ctrl + Shift + P and write the command Reload Window


Edit: It's been two days since I'm no more struggling with this problem so what I think is this is the solution of the problem.


Update


Microsoft has released new language server for python called Pylance, if you had to disable jedi-language-server I would recommend going for Pylance as a language server for Python, here is a link to Pylance documentation pylance-release go and check that out.


[#1726] Wednesday, March 30, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
percol

Total Points: 493
Total Questions: 116
Total Answers: 107

Location: Taiwan
Member since Mon, Sep 6, 2021
3 Years ago
percol questions
Thu, Sep 29, 22, 07:42, 2 Years ago
Sat, Jul 16, 22, 21:00, 2 Years ago
Tue, May 30, 23, 19:16, 1 Year ago
Wed, Aug 18, 21, 02:15, 3 Years ago
;