Skip to content

perf: optimize populateTypesAndNames component deduplication W-21991374#849

Merged
mshanemc merged 7 commits intomainfrom
sm/react-components-optimization
Apr 11, 2026
Merged

perf: optimize populateTypesAndNames component deduplication W-21991374#849
mshanemc merged 7 commits intomainfrom
sm/react-components-optimization

Conversation

@mshanemc
Copy link
Copy Markdown
Contributor

What issues does this PR fix or reference?

@W-21991374@

Description

  • Combined intermediate sourceComponents array into the uniqueSourceComponents deduplication chain, removing one full array allocation and traversal
  • Log line now reports unique component count (post-dedup) instead of the raw resolved count
  • Added NUT (test/nuts/local/populateTypesAndNames.nut.ts) covering: empty input, Apex class resolution, LWC bundle dedup across multiple input files, force-ignore detection via .forceignore, and unresolvable path handling with/without excludeUnresolvable

Note on NUT setup

TestSession stubs process.cwd() via sinon without calling process.chdir. This causes maybeGetTreeContainer to return undefined, making the resolver use the real cwd (workspace root) for FS operations — which misses project files. NUT uses mkdtempSync + cpSync instead so real cwd ≠ projectPath.

Made with Cursor

peternhale and others added 3 commits April 10, 2026 20:40
Use Set-backed unique lists for deletes and non-deletes before resolution.
@mshanemc mshanemc requested a review from a team as a code owner April 11, 2026 16:38
@mshanemc mshanemc merged commit e7b0ee4 into main Apr 11, 2026
19 checks passed
@mshanemc mshanemc deleted the sm/react-components-optimization branch April 11, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants