Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

High CPU usage when using python.autoComplete.extraPaths on VS Code #431

Closed
brettcannon opened this issue Nov 22, 2018 · 8 comments
Closed
Assignees

Comments

@brettcannon
Copy link
Member

microsoft/vscode-python#2838

The use of "python.autoComplete.extraPaths" seems to be common with the last two posts.

@teardemon
Copy link

teardemon commented Nov 30, 2018

i got the same problem.
image

after i delete the folder "C:\Users\[username]\AppData\Roaming\Code\Local Storage" and restart.
it become normal.

if the folder create again, restart the vscode, the problem show again.

@Honzys
Copy link

Honzys commented Dec 7, 2018

I've noticed some weird behaviour.

I've set up "python.analysis.logLevel": "Trace" along with "python.analysis.openFilesOnly": true.

After I do any changes and save the changes in opened file, the code analysis is triggered for whole workspace folder, is this correct behaviour? See the log bellow:

Waiting for parsing to complete.
Parsing complete. Waiting for analysis entries to enqueue.
Enqueue complete. Waiting for analysis to complete.
Received new analysis for file:///some_python_file.py
Analysis complete for file:///some_python_file.py at version 19
 Waiting for analysis of file:///some_python_file.py to complete.
 Waiting for analysis of file:///some_python_file.py to complete.
... (just to make the log shorter)
 Waiting for analysis of file:///some_python_file.py to complete.
Analysis complete.
Opening document file:///some_python_file.py
Parsing document file:///some_python_file.py
Parse complete for file:///some_python_file.py at version 1
Analysis queued for file:///some_python_file.py
Waiting for parsing to complete.
Parsing complete. Waiting for analysis entries to enqueue.
Enqueue complete. Waiting for analysis to complete.
Received new analysis for file:///some_python_file.py
Analysis complete for file:///some_python_file.py at version -1
Received new analysis for file:///some_python_file.py
Analysis complete for file:///some_python_file.py at version 1
 Waiting for analysis of file:///some_python_file.py to complete.
... (just to make the log shorter)
 Waiting for analysis of file:///some_python_file.py to complete.
Analysis complete.
##########Linting Output - mypy##########
##########Linting Output - flake8##########

(I've changed the name of python file to some_python_file.py, but the names were unique and it was printed for every single python file in the workspace folder)

Can someone eligible confirm if it's correct behaviour or not?

Thank you very much.

@jakebailey
Copy link
Member

Currently, the analyzer isn't smart enough to know exactly what all needs to be reanalyzed when something changes, so it may go over unrelated files to make its analysis up to date. Improving this behavior such that we know exactly which files should be reanalyzed on a file change is a work in progress item (#432, #435).

@MikhailArkhipov
Copy link

To verify with (#432, #435).

@MikhailArkhipov
Copy link

This should no longer be happening since there is no looping analysis.

@alecf
Copy link

alecf commented Apr 10, 2019

@MikhailArkhipov I'm still seeing this in 1.33.0 and the python extension 2019.3.6558 on OS X

@MikhailArkhipov
Copy link

Not necessarily same underlying problem. Please open separate issue, tell us what version of the language server (displayed at startup) since it is not connected to extension or VS Code version and what packages are being imported and how long did the analysis take (if it completed). Thanks.

@alecf
Copy link

alecf commented Apr 10, 2019

[Info  - 2:46:36 PM] Microsoft Python Language Server version 0.2.47.0

I didn't install this separately or anything, I assume this just comes with the ms-python.python extension?

(As an aside for anyone reading: turns out I had disabled "jedi" which in turn enables the python language server - turning jedi back on made everything work without cpu spiking..)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants