python-language-server icon indicating copy to clipboard operation
python-language-server copied to clipboard

Very High CPU Usage macOS

Open ChrisMcPherson opened this issue 5 years ago • 2 comments

Environment data

  • Language Server version: 0.5.51.0
  • OS and version: macOS 10.15.5
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.7

Issue

I am consistently experiencing very high CPU usage by the Microsoft.Python.LanguageServer on my macOS 10.15.5. This happened a little over 1 year ago, was resolved through an update, and now seems to be back (unsure, however, if the cause is the same). This is dramatically impacting usable battery life while using VSCode.

Additional lnformation

Screen Shot 2020-07-07 at 10 09 07 AM Screen Shot 2020-07-07 at 10 08 32 AM

ChrisMcPherson avatar Jul 07 '20 15:07 ChrisMcPherson

Please try switching to Pylance, an updated Python language server that we introduced recently. It replaces the older language server and is built to be much faster and use fewer resources (CPU and memory). Give it a try and let us know if that addresses the problem you're seeing.

erictraut avatar Jul 07 '20 15:07 erictraut

I missed the announcement of Pylance, it looks exciting! I have switched to Pylance and will watch performance over the next day or so. Thanks for the tip!

ChrisMcPherson avatar Jul 07 '20 18:07 ChrisMcPherson