kondratyev-nv / vscode-python-test-adapter

Python Test Adapter for the VS Code Test Explorer
https://marketplace.visualstudio.com/items?itemName=LittleFoxTeam.vscode-python-test-adapter
MIT License
117 stars 27 forks source link

Extension causes high cpu load #236

Open Suresh0281 opened 3 years ago

Suresh0281 commented 3 years ago

littlefoxteam.vscode-python-test-adapter-unresponsive.cpuprofile.txt

:warning: Make sure to attach this file from your home-directory: :warning:c:\Users\Myfamily\AppData\Local\Temp\littlefoxteam.vscode-python-test-adapter-unresponsive.cpuprofile.txt

Find more details here: https://github.com/micros littlefoxteam.vscode-python-test-adapter-unresponsive.cpuprofile.txt oft/vscode/wiki/Explain-extension-causes-high-cpu-load

BrendanSimon commented 3 years ago

Yes. I see this too.

I use Win 10 Pro as development host and a Debian Buster as a Guest VirtualBox VM and develop via Remote SSH extension. I've been working with that setup for approximately a year - editing, building, running unit tests, etc.

Just recently my VM goes nuts with very high load averages (above 20 !!), the linux console is very very sluggish (mostly unusable), and the network connection is unresponsive so vscode loses it's SSH connection and wants to reload all the time.

Often the only way to recover is to hard reset the VM (not even a APCI shutdown works) - not great :(

The symptoms are I can load the workspace ok, without any files open. If I open a Python source file then memory usage goes through the roof, and very soon the VM stops responding.

I uninstalled all extensions, except Python. This seems ok. Loading a python file does not send the VM into a death spiral.

If I have the Python Test Explorer extension enabled then things start to go AWOL.

Test Discovery starts but never finishes (I'm using pytest).

These are the smells I observe. I don't know 100% for sure if it is the Python Test Explorer extension, or the Python extension or some other dependency.

Brendan.

EchEdward commented 2 years ago

MacBook Air Apple Silicon (M1) MacOs Big Sur (11.6) VS Code version 1.63 Test Explorer UI v2.21.1 Python Test Explorer for Visual Studio Code v0.7.0

I have a similar problem. When Python Test Explorer for Visual Studio Code is enabled Electron process takes 100% CPU.

Снимок экрана 2022-01-05 в 08 56 52

If I disable the extension and reload vs code high loading of the CPU will disappear.