Profile Poetry identification and avoid whole-inventory cloning with an alias index
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- performance
Direzione di ricerca
Start with crates/pet-poetry/src/lib.rs at find_with_cache and try_from, then use the scale fixtures from #533 and ownership guidance from #536. Measure identification, allocation, operation counts, and timings across representative inventory sizes before choosing whether indexing is justified. Done means evidence-backed behavior tests preserve alias, symlink, workspace, refresh, and invalidation semantics, or document a measured deferral.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Tracking plan: #528
Priority: P3, measurement-gated optimization. Evidence: cloning/linear scan confirmed; end-user latency impact not yet profiled.
Problem
Poetry's cached discovery lookup clones the complete LocatorResult, including all environments, and try_from then scans that result and its symlinks for each candidate. At larger inventories this can produce repeated whole-inventory allocation and candidate-by-environment work. Cold concurrent callers can also repeat cache population work.
Sources: find_with_cache, try_from.
Scope
First measure identification and allocation/operation counts over representative Poetry inventory sizes using deterministic fixtures. If material, share immutable discovery results and index executables/aliases for direct lookup. Reuse existing per-key single-flight machinery where appropriate instead of adding another cache framework.
Preserve Poetry-versus-generic-venv precedence, prefix/project/manager fidelity, platform path semantics, and the full/workspace/kind-filtered refresh-state merge contract. Do not introduce broad cross-refresh cache persistence without an invalidation design.
Acceptance criteria
- The issue records before/after operation or allocation counts and timings across multiple inventory sizes; any optimization claim is tied to evidence.
- If indexing is justified, repeated identification no longer clones/scans the entire inventory for each candidate.
- Alias/case/symlink identity, workspace association, manager details, refresh merging, and configuration invalidation have behavior tests.
- Concurrent cache misses avoid unnecessary duplicate work without deadlocking or permanently caching failures.
- Small-inventory latency and memory do not materially regress under #531/#533.
- If the measured benefit is negligible, close with measurements and a documented deferral instead of landing complexity solely to remove clones.
Dependencies
Depends on #533 for scale fixtures and #536 for stable cache/snapshot ownership. This is deliberately after the reproduced process/transport failures; do not treat it as the first performance fix.
- Lingua principale
- Rust
- Stelle
- 207
- Fork
- 45
- Merge medio
- 8h 19m
- PR unite (30g)
- 2
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/python-environment-tools
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/python-environment-tools#525 · 1 commento ·
-
debt
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
debt
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tutte le issue di microsoft/python-environment-tools
Issue simili
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
paritytech/zombienet-sdk#591 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
farion1231/cc-switch#7638 · 1 commento ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100