cmdCommitToSubrepo routed each changed file to a sub-repo via subRepos.find(...) inside the file loop — O(files * repos). Extract a pure groupFilesBySubrepo() that buckets sub-repos by first path segment and scans only the matching bucket, dropping it to expected O(files + repos). First- match-in-array-order semantics (incl. multi-segment sub-repos) are preserved exactly. Adds the first behavior-lock test for the routing path. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
.changeset/311-subrepo-routing-index.md
Normal file
5
.changeset/311-subrepo-routing-index.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: Fixed
|
||||
pr: 311
|
||||
---
|
||||
Route changed files to sub-repos via a first-segment bucket index instead of an O(files*repos) linear scan (#311).
|
||||
Reference in New Issue
Block a user