Profile Poetry identification and avoid whole-inventory cloning with an alias index
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- performance
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 207
- Forks
- 45
- Ø Merge
- 3 T. 12 Std.
- Gemergte PRs (30 T.)
- 11
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/python-environment-tools
-
debt
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
microsoft/python-environment-tools#538 · 1 Kommentar ·
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
-
debt
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
microsoft/python-environment-tools#533 · 1 Kommentar ·
-
debt
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
microsoft/python-environment-tools#534 · 1 Kommentar ·
Alle Issues in microsoft/python-environment-tools
Ähnliche Issues
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
yantrikos/yantrik-os#255 ·
-
bug CLI custom-model
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
raphamorim/rio#1956 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 Kommentar ·