intelExtractExports deduped export names with `if (!arr.includes(x)) arr.push(x)` across ~8 extraction loops (one doubly-nested over an export block) — O(n^2). Accumulate into Sets (add/has/size) and materialize to an array once at return. Set dedups by value and preserves insertion order, so the returned export list and its first-seen order are identical. Adds behavior-lock tests for dedup + order. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
.changeset/swift-sets-dedupe.md
Normal file
5
.changeset/swift-sets-dedupe.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: Fixed
|
||||
pr: 313
|
||||
---
|
||||
Dedupe extracted exports with a Set instead of O(n^2) array.includes scans in intelExtractExports (#313).
|
||||
Reference in New Issue
Block a user