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.

flake8 process is causing very high CPU ussage

See original GitHub issue

Environment data

  • VS Code version: 1.41.1
  • Extension version (available under the Extensions sidebar): 2020.1.58038
  • OS and version: macOS 10.14.4
  • Python version (& distribution if applicable, e.g. Anaconda): 3.5.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
  • Relevant/affected Python packages and their versions:
    • flake8==3.7.9
    • flake8-bugbear==20.1.3
    • flake8-docstrings==1.5.0
    • flake8-isort==2.8.0
    • flake8-mypy==17.8.0
    • flake8-rst-docstrings==0.0.13
    • pyflakes==2.1.1
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Jedi

Expected behaviour

Linting will not cause CPU usage to spike

Actual behaviour

Process python -m flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s from VS code is using showing 100% CPU usage.

I see that this user was having the same issues, but created an issue in the wrong repo https://github.com/microsoft/vscode/issues/88351

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

Currently opening any Python file causes this to occur. Closing the python files will not terminate the process. Only closing VS code will.

In settings "python.linting.flake8Enabled": true,.

The following is the used .flake8 file

[flake8]
ignore = E203, E266, E501, W503
max-line-length = 80
max-complexity = 18
docstring-convention = numpy
select = B,C,E,F,W,B9,D,RST

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

[Info] Looking for git repository
[Info] Git repository found, initializing review manager and pr tree view.
[Info] Review> Validate state in progress
[Info] Review> Validating state...
[Info] No remote with name 'upstream' found. Please update your 'githubPullRequests.remotes' setting.
[Info] No remote with name 'upstream' found. Please update your 'githubPullRequests.remotes' setting.
[Info] Found GitHub remote
[Info] Found GitHub remote
[Info] Review> Queuing additional validate state
[Info] Review> no matching pull request metadata found for current branch plotting-stypes
[Info] Review> Validating state...
[Info] No remote with name 'upstream' found. Please update your 'githubPullRequests.remotes' setting.
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch plotting-stypes

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

[Extension Host] Info Python Extension: 2020-01-31 09:43:27: > ~/Documents/pyfrb_projects/pyfrb/pyfrb_env/bin/python -m flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Documents/pyfrb_projects/pyfrb/pyfrb/__init__.py

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
luabudcommented, Feb 26, 2020

Thanks for the suggestion! We talked about it with the team and we have unfortunately decided we will not be moving forward with this idea. We think there isn’t an enough widespread need for this to warrant the maintenance cost for the feature.

1reaction
ericsnowcurrentlycommented, Feb 6, 2020

The behavior you want sound reasonable. 😄 We consider it a feature request and will look at how well the change fits in to our plans. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

IIS worker process: High CPU usage (Expert guide)
High worker process CPU usage often causes severe performance degradation because of the complex interplay between the async/parallel nature of modern web ...
Read more >
High CPU usage | Deep Security - Trend Micro
High CPU usage. On a computer protected by Deep Security Agent, you can use these steps to determine and resolve the cause of...
Read more >
emacs-lsp/lsp-mode - Gitter
The high cpu usage even lasts for a tens seconds when I stopped typing at all. Conversely, I tried VSCode (default setting) with...
Read more >
How to Fix High CPU Usage - Intel
Find out all the reasons why your PC displays high CPU usage. Our step-by-step guide will show you how to fix your CPU...
Read more >
Category: Releases | Matrix.org
(#7443); Fix a bug that would cause Synapse not to resync out-of-sync device lists ... replication handling not being correctly recorded in CPU...
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