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.

Discovering tests is massive tests repos with pytest can cause high CPU load.

See original GitHub issue
  • Issue Type: Performance
  • Extension Name: python
  • Extension Version: 2022.10.0
  • OS Version: Darwin arm64 21.5.0
  • VS Code version: 1.69.2

⚠️ Make sure to attach this file from your home-directory: ⚠️file:///var/folders/sk/dqtd4j_50xx6n66myw0n4zn00000gp/T/ms-python.python-unresponsive.cpuprofile.txt

ms-python.python-unresponsive.cpuprofile.txt

The extension ‘Python’ took a very long time to complete its last operation and it has prevented other extensions from running.

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
karthiknadigcommented, Jul 20, 2022

@AlbertMitjans One thing you can do is turn off discover on save, and see if it helps: image

0reactions
karthiknadigcommented, Jul 19, 2022

Unfortunately, no workarounds for this scenario yet. We are working on a more robust test adapter for pytest that should perform better in these scenarios.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions - Pytest-Benchmark
There can be few causes for this: ... Bad tests or too much complexity. The function you're testing is doing I/O, using external...
Read more >
pytest Documentation - Read the Docs
The first test passed and the second failed. You can easily see the intermediate values in the assertion to help you under-.
Read more >
Python pytest - The Blue Book
Pytest automatically finds which tests to run in a phase called test discovery. It will get the tests that match one of the...
Read more >
4.6.x PDF - pytest Documentation
Usage and Invocations. 2.1 Calling pytest through python -m pytest. You can invoke testing through the Python interpreter from the command ...
Read more >
Phoronix Test Suite documentation
The Phoronix Test Suite open-source, cross-platform automated ... which would proceed to install a simple CPU test, execute the test, and report the...
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