Skip to content

fix(core): remove redundant allWorkspaceFiles from the project graph pipeline#34425

Open
leosvelperez wants to merge 2 commits intomasterfrom
nxc-3847
Open

fix(core): remove redundant allWorkspaceFiles from the project graph pipeline#34425
leosvelperez wants to merge 2 commits intomasterfrom
nxc-3847

Conversation

@leosvelperez
Copy link
Member

Current Behavior

allWorkspaceFiles (a flat FileData[] of every file in the workspace) is built, stored, copied, and passed through the project graph pipeline — even though no consumer uses it. The data is fully redundant with fileMap.projectFileMap + fileMap.nonProjectFiles. In the daemon, it's deep-copied on every graph serialization via copyFileData() and rebuilt on every incremental update via buildAllWorkspaceFiles().

Expected Behavior

allWorkspaceFiles is removed from:

  • retrieveWorkspaceFiles return value
  • buildProjectGraphUsingProjectFileMap parameters
  • hydrateFileMap / getFileMap / storedAllWorkspaceFiles
  • fileMapWithFiles daemon state and SerializedProjectGraph interface
  • WorkspaceFileMap interface and updateFileMap return value

This eliminates redundant allocations, copies, and retained references.

Native/Rust code is unaffected — it uses rustReferences.allWorkspaceFiles (ExternalObject), which is a separate code path.

@leosvelperez leosvelperez self-assigned this Feb 12, 2026
@leosvelperez leosvelperez requested a review from a team as a code owner February 12, 2026 14:35
@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit a076e36
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69bc2623900c860008b17be2
😎 Deploy Preview https://deploy-preview-34425--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit a076e36
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69bc2623d9dab800089a89af
😎 Deploy Preview https://deploy-preview-34425--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Feb 12, 2026

View your CI Pipeline Execution ↗ for commit a076e36

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 52m 27s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 8s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 8s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-19 17:33:38 UTC

Copy link
Member

@AgentEnder AgentEnder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline

@leosvelperez leosvelperez added the target: next major version To be merged for the next major version release label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target: next major version To be merged for the next major version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants