Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): improve local plugin loading by reading only tsconfig comp #29092

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jogelin
Copy link
Contributor

@jogelin jogelin commented Nov 27, 2024

Current Behavior

When loading local plugins, Nx compiles TypeScript code on the fly. To achieve this, Nx uses the TypeScript function parseJsonConfigFileContent, which processes the entire configuration.

In large repositories, this process can take more than 10 seconds per plugin. Even though the process is parallelized, it significantly impacts performance when generating the graph.

Expected Behavior

Loading local plugins should be fast to allow immediate graph generation. Since only the compiler options are needed, we can read the root tsconfig file directly.

With this approach, loading a plugin now takes just 200ms, even for large monorepos.

@jogelin jogelin requested a review from a team as a code owner November 27, 2024 07:56
Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Nov 27, 2024 7:59am

Copy link

nx-cloud bot commented Nov 27, 2024

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.

1 participant