Skip to content

Lazy-register Conda manager (mirror v1.28 lazy registration for pipenv/poetry/pyenv) #1582

@eleanorjboyd

Description

@eleanorjboyd

Problem

Conda discovery is the dominant per-locator cost in PET on Windows by a large margin — confirmed by a per-locator timing investigation against pet.refresh.locatorsJson data. The cost is paid on every refresh, including in sessions where the user never picks a conda env.

Other heavyweight env managers — pipenv, poetry, pyenv — were converted to lazy registration in v1.28: register the manager so users still see it in the picker, but defer the actual discovery work until first use.

Proposal

Apply the same pattern to Conda. Register the manager unconditionally on activation, but defer the call into the underlying Conda locator until something specifically requests conda envs. This removes Conda discovery from the foreground env-selection path for sessions where conda is installed but unused.

Sits orthogonal to PET-side fixes for Conda's per-refresh cost — those still help when the user does open the picker, but lazy registration removes the cost from startup entirely.

Related:

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions