Skip to content

Analysis of peewee with the new LS never finishes #2682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
albireox opened this issue Sep 25, 2018 · 6 comments
Closed

Analysis of peewee with the new LS never finishes #2682

albireox opened this issue Sep 25, 2018 · 6 comments
Assignees
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.

Comments

@albireox
Copy link

Environment data

  • VS Code version: 1.28.0-insiders
  • Extension version (available under the Extensions sidebar): 2018.8.1-beta
  • OS and version: 10.14
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.0 (pyenv)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): none
  • Relevant/affected Python packages and their versions: peewee/master

Actual behavior

I have a local checked out version of peewee. When the new LS tries to analyse the main file, peewee.py, it uses >100% of CPU and the RAM usage increases continuously (over 40GB at some point). This doesn't seem to complete, even after leaving it open and running for an hour. Things like the Go to symbol list never get rendered.

Expected behavior

Less use of resources.

Steps to reproduce:

  1. Check out peewee
  2. Run the new LS
@brettcannon brettcannon added area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. needs verification labels Sep 25, 2018
@brettcannon
Copy link
Member

Can you please verify, @ericsnowcurrently ?

@ericsnowcurrently
Copy link

Thanks for letting us know about this problem, @albireox. I'm having trouble reproducing the behavior that you're reporting. Here's what I did:

  1. clone the peewee repo locally
  2. open the folder in VS Code
  3. enable the new language server ("python.jediEnabled": false)
  4. open peewee.py

When I did that, everything resolved almost immediately (with no high CPU/RAM usage). I could tell the language server was done processing because the Outline section in the Explorer side bar was fully populated.

Are there any other details that would help us sort this out? FYI, I am using Ubuntu linux. It's possible that the problem is Mac-specific. Is there any way you could try this out on linux to see if you get the same behavior? Either way, we'll work on trying it out on Mac.

@ericsnowcurrently
Copy link

I tried this on Mac and found that the language server appears to be starting still. Hover tooltips all show None and the Outline stays empty. However, I did not see CPU/RAM issues. We'll investigate further.

@albireox
Copy link
Author

albireox commented Oct 2, 2018

Thanks for looking into this @ericsnowcurrently. Unfortunately I don't have a Linux box handy to test this. The steps you describe are what cause the problem for me. I jus tested it with the latest versions of vscode-insiders, vscode-python, and python-language-server and still get the large usage of resources. The RAM usage in particular never seems to stop growing.

In my case the hover tooltips seem to work, I'm seeing the linter output, but nothing in the outline.

@albireox
Copy link
Author

albireox commented Oct 5, 2018

I can confirm that PR201 from python-language-server seems to fix the problem.

@DonJayamanne
Copy link

@MikhailArkhipov fyi

@lock lock bot locked as resolved and limited conversation to collaborators Nov 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.
Projects
None yet
Development

No branches or pull requests

5 participants