question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python Language Server uses too much CPU

See original GitHub issue

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

image image image image image

Steps to reproduce:

  1. Install several versions of Python
  2. Run VS Code

Logs

Output for Python in the Output panel (ViewOutput, 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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jonaswittcommented, 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.

1reaction
dwtcommented, 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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Language Server uses too much CPU #479 - GitHub
LanguageServer is running up to 100%+ CPU usage when I have large Python projects open (one, in particular, is ~200MB) within a virtual...
Read more >
vs code jedi language server is running over 120.9% of CPU ...
Python by itself doesn't really consume any CPU. A program using python3 is misbehaving and consuming too many resources. I use ps command ......
Read more >
Pyls and jedi-language-server 100% CPU usage
I'm using the latest version of python-language-server. It is very slow, taking seconds to show hoverdoc or highlight. I have disabled all pyls...
Read more >
Python server program has high cpu usage - Stack Overflow
I tested your code on Windows 8 64-bit, core i5 6GB ram, the CPU usage never goes above 32% in my case! –...
Read more >
Language Server Extension Guide - Visual Studio Code
As language analysis tools are often heavy on CPU and Memory usage, running them in separate process avoids performance cost. Here is an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found