Skip to content

Analysis of peewee with the new LS never finishes #2682

Closed

Description

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

Activity

  1. brettcannon commented on Sep 27, 2018

    @brettcannon
    Member

    Can you please verify, Eric Snow (@ericsnowcurrently) ?

  2. ericsnowcurrently commented on Oct 2, 2018

    @ericsnowcurrently

    Thanks for letting us know about this problem, José Sánchez-Gallego (@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.

  3. ericsnowcurrently commented on Oct 2, 2018

    @ericsnowcurrently

    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.

  4. albireox commented on Oct 2, 2018

    @albireox
    Author

    Thanks for looking into this Eric Snow (@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.

  5. albireox commented on Oct 5, 2018

    @albireox
    Author

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

  6. DonJayamanne commented on Oct 6, 2018

    @DonJayamanne
  7. locked as resolved and limited conversation to collaborators on Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions