Skip to content

Speed up interpreter selection (with cached & or partial lists) #666

Closed

Description

Currently the performance selection of interpreters is left at the mercy of external tools such as conda and the like. On Windows these tools can be extremely slow.
This will only get slower as we support more sources for interpreters or if conda and other tools get slower).

Suggestion:

  • Cache list of interpreters (filter to exclude invalid items, easy file check)
  • Cache list of conda environments (re-query only if we have new items in environments.txt)
  • Display partial list of interpreters while conda and the like run in background
  • Display Loading Conda Envs in list for those not yet completed (could apply to registry searches as well)

This should improve ux significantly (at least in Windows).

Activity

  1. DonJayamanne commented on Jan 31, 2018

    @DonJayamanne
    Author

    Brett Cannon (@brettcannon) Dan Taylor (@qubitron) any suggestions.
    Dan Taylor (@qubitron) you have experienced delays here.

  2. changed the title [-]Speed up interpreter selection (with partial lists)[/-] [+]Speed up interpreter selection (with cached & or partial lists)[/+] on Jan 31, 2018
  3. qubitron commented on Jan 31, 2018

    @qubitron

    Don Jayamanne (@DonJayamanne) I like your suggestion, I think it results in the best possible user experience given the constraints. Just don't know how complex it is to implement. At a minimum, displaying "Loading..." any time we are waiting is a good idea.

    This currently an issue only when selecting an interpreter soon after first loading the extension, correct?

  4. DonJayamanne commented on Jan 31, 2018

    @DonJayamanne
    Author

    This currently an issue only when selecting an interpreter soon after first loading the extension, correct?

    Yes, but appliers to all instances of VS Code. I.e. if you were to open another instance of VS Code, this delay would be expected.

  5. brettcannon commented on Jan 31, 2018

    @brettcannon
    Member

    The "Loading ..." message seems reasonable. Caching also seems reasonable as long as we provide a way to blow the cache out manually, e.g. Select Interpreters has a "Re-check for interpreters" option or something.

  6. brettcannon commented on Jan 31, 2018

    @brettcannon
    Member

    And luckily this only affects selecting the interpreter, so if you already have a conda environment selected then there's no penalty there, correct?

  7. DonJayamanne commented on Feb 1, 2018

    @DonJayamanne
    Author

    And luckily this only affects selecting the interpreter, so if you already have a conda environment selected then there's no penalty there, correct?

    Yes

  8. added a commit that references this issue on Feb 1, 2018
    b09a421
  9. locked as resolved and limited conversation to collaborators on Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions