-
fix(js): improve the `@nx/js/typescript` plugin performance (#30024)
发布于
2025-02-13 19:26:38 +00:00 Improve the perf of the
@nx/js/typescriptplugin both in cold and warm
scenarios. The main changes done are:- Batch some processing to do it once instead of doing it per config
file (avoids some duplicated processing) - Use a custom TS host to read tsconfig files to reduce I/O operations
- Cache tsconfig files' reads
Benchmark results in a repo with 656 TS projects:
# Before the changes Cold (NX_CACHE_PROJECT_GRAPH=false): ~2285 ms Warm (NX_CACHE_PROJECT_GRAPH=true): ~2142 ms # After the changes Cold (NX_CACHE_PROJECT_GRAPH=false): ~597 ms Warm (NX_CACHE_PROJECT_GRAPH=true): ~220 msNote: Once https://github.com/nrwl/nx/pull/29935 is merged. I'll send
another change to batch the file hashes.Current Behavior
Expected Behavior
Related Issue(s)
Fixes #
下载附件
- Batch some processing to do it once instead of doing it per config