0c2ed4c3e5
The cached file-system was implemented to speed up ngcc processing, but in reality most files are not accessed many times and there is no noticeable degradation in speed by removing it. Benchmarking `ngcc -l debug` for AIO on a local machine gave a range of 196-236 seconds with the cache and 197-224 seconds without the cache. Moreover, when running in parallel mode, ngcc has a separate file cache for each process. This results in excess memory usage. Notably the master process, which only does analysis of entry-points holds on to up to 500Mb for AIO when using the cache compared to only around 30Mb when not using the cache. Finally, the file-system cache being incorrectly primed with file contents before being processed has been the cause of a number of bugs. For example https://github.com/angular/angular-cli/issues/16860#issuecomment-614694269. PR Close #36687 |
||
---|---|---|
.. | ||
src | ||
test | ||
BUILD.bazel | ||
README.md | ||
index.ts | ||
main-ivy-ngcc.ts | ||
main-ngcc.ts |
README.md
Angular Compatibility Compiler (ngcc)
This compiler will convert node_modules
compiled with ngc
, into node_modules
which
appear to have been compiled with ngtsc
.
This conversion will allow such "legacy" packages to be used by the Ivy rendering engine.
Building
The project is built using Bazel:
yarn bazel build //packages/compiler-cli/ngcc
Unit Testing
The unit tests are built and run using Bazel:
yarn bazel test //packages/compiler-cli/ngcc/test
Integration Testing
There are tests that check the behavior of the overall executable:
yarn bazel test //packages/compiler-cli/ngcc/test:integration