angular-cn/packages/compiler-cli/ngcc/src
JoostK 9cec94a008 perf(compiler-cli): use bound symbol in import graph in favor of module resolution (#40948)
The import graph scans source files for its import and export statements
to extract the source files that it imports/exports. Such statements
contain a module specifier string and this module specifier used to be
resolved to the actual source file using an explicit module resolution
step. This is especially expensive in incremental rebuilds, as the
module resolution cache has not been primed during program creation
(assuming that the incremental program was able to reuse the module
resolution results from a prior compilation). This meant that all module
resolution requests would have to hit the filesystem, which is
relatively slow.

This commit is able to replace the module resolution with TypeScript's
bound symbol of the module specifier. This symbol corresponds with the
`ts.SourceFile` that is being imported/exported, which is exactly what
the import graph was interested in. As a result, no filesystem accesses
are done anymore.

PR Close #40948
2021-03-08 12:05:48 -08:00
..
analysis perf(compiler-cli): use bound symbol in import graph in favor of module resolution (#40948) 2021-03-08 12:05:48 -08:00
dependencies refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
entry_point_finder fix(compiler-cli): ensure ngcc can handle wildcard base-paths (#41033) 2021-03-01 15:25:44 -08:00
execution fix(ngcc): do not fail hard when a format-path points to a non-existing or empty file (#40985) 2021-02-26 08:26:33 -08:00
host docs: remove duplicated the (#40434) 2021-01-14 11:33:57 -08:00
locking refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
migrations refactor(compiler-cli): implement `DeclarationNode` node type (#38959) 2020-10-12 08:32:46 -07:00
packages refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00
rendering fix(compiler-cli): set TS original node on imported namespace identifiers (#40711) 2021-02-11 15:58:25 -08:00
writing fix(compiler-cli): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
command_line_options.ts refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00
constants.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
main.ts refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00
ngcc_options.ts refactor(ngcc): support processing only the typings files of packages (#40976) 2021-02-24 14:23:14 -08:00
path_mappings.ts refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
utils.ts refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00