mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
21a04ef5be
Call tsc_wrapped's fileExists function instead of TypeScript's. tsc_wrapped (used internally by ngc-wrapped) has an optimization under bazel to avoid file system calls where possible. It takes advantage bazelOpts.allowedInputs, which contains a list of all files available for compilation. File system calls can be quite slow depending on the file system. In google3 I saw a 38 seconds compilation, which spent 6 seconds just doing fs.stat calls during module resolution. Those fs.stat calls are entirely gone after with this change. PR Close #46069