loadConfig called detectSubRepos(cwd) at up to 3 sites per invocation (root-config requiresFilesystem migration, workstream-config requiresFilesystem migration, and the planning.sub_repos filesystem re-sync) — all with the same cwd, yielding identical results. Introduce a per-call lazy memo (getDetectedSubRepos) so the directory scan runs at most once per loadConfig call while preserving all conditional logic. Fixes #315. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
.changeset/315-subrepo-detect-memo.md
Normal file
5
.changeset/315-subrepo-detect-memo.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: Fixed
|
||||
pr: 315
|
||||
---
|
||||
`loadConfig` now memoizes `detectSubRepos(cwd)` per call, collapsing up to 3 redundant directory scans into 1 when migrations and filesystem re-sync both trigger.
|
||||
Reference in New Issue
Block a user