You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(paths): stored_spelling lists every component on every install; skip on non-folding volumes #5432
status/triagedAutomated advice completed; deduplication only. Not human approval; silence is not approval.type/performanceLatency, throughput, memory, install time.
apm_cli.utils.paths.stored_spelling lists the directory at every path component, including components already spelled exactly (the part not in names check needs the listing). Since the fix for #5424 (PR #5426), deps/local_identity.stored_directory calls it on every install, on every OS, for each root and each transitive local dependency edge.
Cost
For N local packages under one directory (e.g. packages/), each lookup lists that directory and scans its N names, so one install does O(N^2) name comparisons plus one listdir per component per local edge. On case-sensitive volumes (most Linux filesystems) the work never changes the result: the exact entry always wins.
Proposed fix
Probe once per project root whether the volume folds case or Unicode normalization (for example, check whether a case-swapped spelling of the root resolves to the same directory with os.path.samefile). On a non-folding volume, return the anchored path without listing. On a folding volume, keep the current behaviour, and cache each directory listing per install.
Acceptance
Linux (non-folding): zero extra listdir calls per local edge, covered by a syscall-count or perf budget cell.
Thanks for the detailed cost analysis. This is triaged as a performance follow-up to #5424 and #5426, and it stays on the 0.40.0 milestone. Scope will be confirmed before work starts.
Generated by autopilot-issue-triage-worker. This comment is AI-generated and may contain errors.
status/triagedAutomated advice completed; deduplication only. Not human approval; silence is not approval.type/performanceLatency, throughput, memory, install time.
Activity
danielmeppiel commentedon Nov 25, 2026
Thanks for the detailed cost analysis. This is triaged as a performance follow-up to #5424 and #5426, and it stays on the 0.40.0 milestone. Scope will be confirmed before work starts.
Generated by autopilot-issue-triage-worker. This comment is AI-generated and may contain errors.