Profile Poetry identification and avoid whole-inventory cloning with an alias index
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- performance
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 207
- フォーク
- 45
- 平均マージ
- 8時間 19分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/python-environment-tools のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/python-environment-tools#525 · コメント 1 件 ·
-
debt
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
debt
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/python-environment-tools の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
issue
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
web-infra-dev/rspack#15847 ·