You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extension version (available under the Extensions sidebar): 2018.6.0
OS and version: MacOS High Sierra
Python version (& distribution if applicable, e.g. Anaconda): 3.6.6
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Conda
Relevant/affected Python packages and their versions: Dash 0.21.1
Actual behavior
I am writing an app using Dash library. The extension would fire up a python process pretty frequently that is pretty CPU heavy. I am not sure what the process does, but I am suspecting that it is trying to do something that helps the autocompletion feature. Also, the autocomplete or suggestions are pretty slow. Anybody else with the same experience?
I assume you are using default Jedi completion. I wonder if you can try insider's build and set python.jediEnabled to false to try new Python language server.
I am having this issue as well! Tested on code 1.25 and insiders 1.26 (2018-07-20). Python extension version 2018.7.0. I am using a python 3.6.5 venv via pyenv with yapf autoformatting. MacOS High Sierra 10.13.6.
It seems to be tied to linting. When I save, CPU usage spikes and my pylint results take quite a while to appear. Once the linting results have appeared, CPU usage returns to normal. Interestingly, the CPU usage does not appear in Code's Process Explorer, but does appear in Activity Monitor.
Brett Cannon (@brettcannon) Ubuntu 16.04
I think VS Code completion for large-scale external libs like wxpython , is really slow , and much slower than Pycharm I have to say. Maybe Jedi should be the reason.
So what's interesting is that my project recently stopped exhibiting this behavior to such a degree. Usage will spike to ~99%, but only for about a second.
Unfortunately, I don't have to time to try to recreate a minimum viable example, but I can provide you with two files:
Unless someone can provide a code sample that reproduces for the language server I'm going to close this as just a side-effect for Jedi and/or Pylint simply being expensive to run and not the direct fault of the extension.
Activity
MikhailArkhipov commentedon Jul 13, 2018
I assume you are using default Jedi completion. I wonder if you can try insider's build and set
python.jediEnabledto false to try new Python language server.amirhosseindavoody commentedon Jul 13, 2018
Thanks for the tip. I will try it out and let you know how it goes.
[-]Performance issue[/-][+]Heavy CPU usage[/+]samhinshaw commentedon Jul 21, 2018
I am having this issue as well! Tested on code 1.25 and insiders 1.26 (2018-07-20). Python extension version 2018.7.0. I am using a python 3.6.5 venv via pyenv with yapf autoformatting. MacOS High Sierra 10.13.6.
Tested with
"python.jediEnabled": falseand not.samhinshaw commentedon Jul 25, 2018
It seems to be tied to linting. When I save, CPU usage spikes and my pylint results take quite a while to appear. Once the linting results have appeared, CPU usage returns to normal. Interestingly, the CPU usage does not appear in Code's Process Explorer, but does appear in Activity Monitor.
More information in a gist
anribras commentedon Jul 27, 2018
Same issues .
Code version: 1.25.1
vs-python : 2018.7.1
Cpu load is really huge when Jedi is doing some completion job and all operations become very slow.
brettcannon commentedon Aug 2, 2018
anribras what OS are you running?
Amirhossein Davoody (@amirhosseindavoody) Are you running Pylint?
anribras commentedon Aug 2, 2018
Brett Cannon (@brettcannon) Ubuntu 16.04
I think VS Code completion for large-scale external libs like wxpython , is really slow , and much slower than Pycharm I have to say. Maybe Jedi should be the reason.
brettcannon commentedon Aug 2, 2018
anribras I'm sure Jedi is the reason, which is why we are asking folks to try the experimental language server to see how that performs for them.
amirhosseindavoody commentedon Aug 3, 2018
Brett Cannon (@brettcannon) I am using the experimental python server for about a week but still seeing the same high cpu usage.
brettcannon commentedon Aug 3, 2018
Amirhossein Davoody (@amirhosseindavoody) do have any code you can share which exhibits the high CPU usage?
samhinshaw commentedon Aug 8, 2018
So what's interesting is that my project recently stopped exhibiting this behavior to such a degree. Usage will spike to ~99%, but only for about a second.
Unfortunately, I don't have to time to try to recreate a minimum viable example, but I can provide you with two files:
I understand if these are too verbose to be helpful, but maybe they will still provide some insight. I will try to revisit this if I can.
MikhailArkhipov commentedon Aug 9, 2018
Occasional spike is normal, analysis runs several threads run when text buffer changes.
romanbsd commentedon Aug 15, 2018
I think that it's related to pylint.
raytroop commentedon Aug 26, 2018
I think Jedi is the root of cpu spike, it's slow and resource expensive for vscode.
"python.jediEnabled": falsesave my cpu.brettcannon commentedon Aug 27, 2018
Unless someone can provide a code sample that reproduces for the language server I'm going to close this as just a side-effect for Jedi and/or Pylint simply being expensive to run and not the direct fault of the extension.