Skip to content

Extension causes high cpu load due to interpreter discovery #11924

Closed

Description

@connerf
  • Issue Type: Performance
  • Extension Name: python
  • Extension Version: 2020.5.80290
  • OS Version: Windows_NT x64 10.0.18362
  • VSCode version: 1.45.1

⚠️ Make sure to attach this file from your home-directory:
⚠️C:\Users\cferguson\ms-python.python-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on May 20, 2020
  2. shyamyadati commented on May 22, 2020

    @shyamyadati

    I can also confirm the same issue on OS X:

    microsoft/vscode#98286 (comment)

  3. karthiknadig commented on May 26, 2020

    @karthiknadig
    Member

    condor (@connerf) Can you please attach the cpu-profile.txt from here C:\Users\cferguson\ms-python.python-unresponsive.cpuprofile.txt

  4. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on May 26, 2020
  5. connerf commented on May 26, 2020

    @connerf
    Author

    Karthik Nadig (@karthiknadig) is this what you are looking for? Or would you prefer the text in this box?

    ms-python.python-unresponsive.cpuprofile.txt

  6. ParthiBa commented on Jul 12, 2020

    @ParthiBa

    ms-python.python-unresponsive.cpuprofile.txt
    it very slow while changing python interpreter . if i am using non -venv or non-pyenv then is not an issue

  7. karthiknadig commented on Jul 15, 2020

    @karthiknadig
    Member

    All these cases are due to how the extension tries to find and figure out the details about the interpreter. We are in the process of refactoring the code that does interpreter discovery. One of the thing we are making sure is to reduce the number of python processes we create while figuring out interpreter info.

  8. 73 remaining items

  9. karrtikr commented on Oct 15, 2021

    @karrtikr

    Very interesting, thank you. Just having

    "python.experiments.optOutFrom": [
        "pythonDiscoveryModuleWithoutWatcher",
    ],
    

    works for me.

    Extension removed support for opting out of pythonDiscoveryModuleWithoutWatcher with 2021.10.1317843341 (see #17563), which is why it started happening now for you guys. But it seems the new discovery code (meaning experiment pythonDiscoveryModuleWithoutWatcher) was likely buggy going way back.

    I'll let you know if I need anything else.

  10. mpratscher commented on Oct 16, 2021

    @mpratscher

    Kartik Raj (@karrtikr) Version v2021.9.1246542782 also works for me. I tried it based on sn0wfa11's earlier post: #11924 (comment)
    I do not have any opt outs in my settings (see my settings_json.txt file above). Also, note that python.logging.level and files.watcherExclude were only added for this testing; those are not typically there for my settings.

  11. karrtikr commented on Oct 16, 2021

    @karrtikr

    mpratscher Noted, thanks.

    I do not have any opt outs in my settings

    You actually have telemetry disabled, which effectively means you have opted out of all experiments.

  12. Touyu-Pan commented on Oct 16, 2021

    @Touyu-Pan

    I'm getting stuck at "Discovering Python Interpreters".
    I really could use some helps
    ms-python.python-unresponsive.cpuprofile.txt
    Python output.txt
    settings_json.txt
    .

  13. iScottMark commented on Oct 18, 2021

    @iScottMark

    Just updated to 1.61.0 and this crap started again... The opt-outs are already in place. It gets stuck on "Discovering Python Interpreters". Trying to use the circuitpython extension. ms-python.python-unresponsive.cpuprofile.txt

    It looks like the extension cannot find an interpreter when selecting "open folder" and opening the microcontroller drive. If I copy the files off to a non-external drive it works fine...

    Create a new folder in D:\ drive not in D:\ and it worked well !

  14. changed the title [-]Extension causes high cpu load[/-] [+]Extension causes high cpu load due to interpreter discovery[/+] on Oct 18, 2021
  15. added and removed
    investigatingWe are looking into the cause of the issue
    on Oct 18, 2021
  16. karrtikr commented on Oct 18, 2021

    @karrtikr

    Should be fixed with #17781. Use Extension: Install from VSIX command to install the following VSIX: https://github.com/microsoft/vscode-python/suites/4087722570/artifacts/104116878 which has the fix!

  17. Touyu-Pan commented on Oct 19, 2021

    @Touyu-Pan

    Should be fixed with #17781. Use Extension: Install from VSIX command to install the following VSIX: https://github.com/microsoft/vscode-python/suites/4087722570/artifacts/104116878 which has the fix!

    Lots of thanks!!!

  18. jing-bi commented on Nov 5, 2021

    @jing-bi

    Seems the VSIX is expired, can you please repost it again?

  19. locked as resolved and limited conversation to collaborators on Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions