posit-dev / posit-dev/positron
Improve scanning and startup strategy for environments with 100s of Python envs
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
Originally posted by @gonzad66 in https://github.com/posit-dev/positron/discussions/13003:
Hi,
When you have an environment with +100 python interpreters (conda envs, venvs, system, modules) python discovery scan all of them as part of the starting step. In our case, it takes around a minute. Moreover, this step is done each time that a positron session is started.
It is possible to prevent the python discovery but allow the user to select the python interpreter only if it will be used in the current session?
Best,
Danilo
Originally posted by @gonzad66 in https://github.com/posit-dev/positron/discussions/13003#discussioncomment-16652452:
Dear @juliasilge ,
Thanks for the feedback. When I mentioned a shared environment is that it is running in such way that is used by multiple users concurrently, each one with their own use case.
About the suggested interpreter settings. Python discovery is running in the background even if I am defining the default python interpreter. And disabling python is not a way to go.
An alternative could be blocking any scanning by default (python.interpreters.exclude), then the users need to setup manually python.interpreters.override to select the interpreters that they wants to use. After that, restart positron.
Maybe enabling an option that prevents the python discovery across the filesystem and let the user focus on the paths that they want to use interactively could be a way to go. For instance, enabling on the interpreter section passing a path argument, then scan this path.
Best,
Danilo
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Python discovery startup flow and the interpreter settings mentioned in the issue, including python.interpreters.exclude and python.interpreters.override. Determine how discovery runs on session startup and how an interpreter could be selected for the current session. Done means avoiding unnecessary scans across large environment collections while preserving a usable way to choose an interpreter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience, performance, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100