Nx
Enterprise
Nx
perf(core): optimize project graph cache validation Improve performance of `shouldRecomputeWholeGraph` which runs on every Nx command that touches the project graph. Changes: 1. Add pre-computed hashes to FileMapCache for pathMappings, nxJsonPlugins, and pluginsConfig - computed once when cache is written, compared on read 2. Replace JSON.stringify comparison with hash comparison using native hasher 3. Maintain backward compatibility with legacy caches (fallback to old logic) 4. Replace JSON.parse(JSON.stringify) deep clone with structuredClone Performance impact: - Cache validation: O(1) hash comparison vs O(n) JSON.stringify per item - Deep clone: structuredClone is 2-3x faster than JSON round-trip - Hot path: runs on every `nx build`, `nx test`, `nx run`, etc. The native hasher uses xxhash which is significantly faster than JSON.stringify for comparison purposes.
nx-cloud record -- nx-cloud conformance:check
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
1 run failed
nx-cloud record -- nx-cloud conformance:check
Click to copy
Linux
4 CPU cores
5c8b2148
33736