Skip to content

fix(core): improve buildExplicitTypeScriptDependnecies performance#33963

Merged
meeroslav merged 8 commits intomasterfrom
perf/improve-create-dependnecies
Jan 14, 2026
Merged

fix(core): improve buildExplicitTypeScriptDependnecies performance#33963
meeroslav merged 8 commits intomasterfrom
perf/improve-create-dependnecies

Conversation

@meeroslav
Copy link
Contributor

@meeroslav meeroslav commented Dec 19, 2025

On test repo reduces the nx/js/dependencies-and-lockfile:createDependencies:

  • from 10506ms
  • to 3665ms

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Dec 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nx-dev Ready Ready Preview Jan 14, 2026 1:12pm

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Dec 19, 2025

View your CI Pipeline Execution ↗ for commit d4dc2d2

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 27m 54s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 43s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 12s 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-01-14 20:56:26 UTC

@netlify
Copy link

netlify bot commented Dec 19, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit d4dc2d2
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6967950a3e1bc800086d7003
😎 Deploy Preview https://deploy-preview-33963--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.

@meeroslav meeroslav marked this pull request as ready for review December 19, 2025 17:19
@meeroslav meeroslav requested review from a team as code owners December 19, 2025 17:19
> = {},
private readonly npmResolutionCache: NpmResolutionCache = defaultNpmResolutionCache
private readonly npmResolutionCache: NpmResolutionCache = defaultNpmResolutionCache,
private readonly packageJsonResolutionCache: PackageJsonResolutionCache = defaultPackageJsonResolutionCache
Copy link
Collaborator

Choose a reason for hiding this comment

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

I did not review too carefully.. but just to sanity check me...

This is OK for the daemon because everytime we calculate dependencies, we create a brand new project locator with no cache right? So this cache will not remain between different graph calculations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, exactly. The cache is reused only during the single CLI command/daemon OP lifetime.

nx-cloud[bot]

This comment was marked as outdated.

Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

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

Important

At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.

Nx Cloud has identified a possible root cause for your failed CI:

Our e2e test failure is caused by an external npm registry issue where @babel/helper-plugin-utils@^7.28.6 is unavailable (only 7.27.1 exists), not by the PR's package.json caching optimizations. This environment_state failure occurs during package installation for react-scripts@5.0.1 and requires either registry recovery or dependency chain updates to resolve.

No code changes were suggested for this issue.

🔂 A CI rerun has been triggered by adding an empty commit to this branch.

Nx Cloud View detailed reasoning on Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

@meeroslav meeroslav merged commit 95300a2 into master Jan 14, 2026
21 of 23 checks passed
@meeroslav meeroslav deleted the perf/improve-create-dependnecies branch January 14, 2026 21:10
FrozenPandaz pushed a commit that referenced this pull request Jan 14, 2026
…33963)

On test repo reduces the
`nx/js/dependencies-and-lockfile:createDependencies`:
- from `10506ms`
- to `3665ms`

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
(cherry picked from commit 95300a2)
@github-actions
Copy link
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants