Skip to content
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

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

Closed
DonJayamanne opened this issue Jan 31, 2018 · 6 comments · Fixed by #676
Closed

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

DonJayamanne opened this issue Jan 31, 2018 · 6 comments · Fixed by #676
Labels
feature-request Request for new features or functionality

Comments

@DonJayamanne
Copy link

DonJayamanne commented Jan 31, 2018

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).

@DonJayamanne DonJayamanne added feature-request Request for new features or functionality awaiting 2-PR labels Jan 31, 2018
@DonJayamanne DonJayamanne added this to the February 2018 milestone Jan 31, 2018
@DonJayamanne
Copy link
Author

@brettcannon @qubitron any suggestions.
@qubitron you have experienced delays here.

@DonJayamanne DonJayamanne changed the title Speed up interpreter selection (with partial lists) Speed up interpreter selection (with cached & or partial lists) Jan 31, 2018
@qubitron
Copy link

@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?

@DonJayamanne
Copy link
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.

@brettcannon
Copy link
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.

@brettcannon
Copy link
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?

@DonJayamanne
Copy link
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

DonJayamanne added a commit that referenced this issue Feb 1, 2018
performance improvements (fixes #666)
@DonJayamanne DonJayamanne modified the milestones: February 2018, March 2018 Feb 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants