Python Language Server uses too much CPU #479
Description
@VelizarVESSELINOV commented on Tue Dec 04 2018
Environment data
- VS Code version: 1.29.1
- Extension version (available under the Extensions sidebar): 2018.11.0
- OS and version: macOS Mojave 10.14.1
- Python version (& distribution if applicable, e.g. Anaconda): Python 3, Python 2...
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
- Relevant/affected Python packages and their versions: N/A
Expected behaviour
< 1% CPU
Actual behaviour
> 99% CPU
Steps to reproduce:
- Install several versions of Python
- Run VS Code
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
Starting Microsoft Python language server.
Microsoft Python Language Server version 0.1.65.0
Initializing for /usr/local/bin/python3
@brettcannon commented on Wed Dec 05 2018
Do you have "python.autoComplete.extraPaths"
defined?
@PushUpek commented on Thu Dec 06 2018
I have the same issue, but only with python2
@VelizarVESSELINOV commented on Thu Dec 06 2018
@brettcannon only in the default user settings defined as []
@VelizarVESSELINOV commented on Thu Dec 06 2018
It is the biggest CPU consumer of all the processes: >21 hours
Side comment that maybe it is the case of @PushUpek I have a lot of files and folders in my current folder that is not Python code or libraries, questioning if Microsoft Python Server is not trying to parse GiB of data continuously in the current folder of VS Code project.
@jonaswitt commented on Mon Dec 10 2018
+1 - I have the same problem with
VS Code 1.29.1
Microsoft Python Language Server version 0.1.65.0
Python Extension 2018.11.0
Python 2.7.15 (venv-based environment)
My python.autoComplete.extraPaths
setting is also []
. I tried to disable Jedi and Linting. I keep killing the process to keep my Macbook's fans from spinning, but it always respawns at 100% CPU usage.
Is there any way to disable the language server? I believe my only option right now is to disable the python extension completely.
@dwt commented on Mon Dec 10 2018
This happens for me too. Python 2.7 with a moderately big project. What Info can I provide to help debug this?