angular/packages/compiler-cli/src
JoostK 8fcadaad48 perf(compiler-cli): cache source file for reporting type-checking diagnostics (#47471)
When reporting type-checking diagnostics in external templates we create a
`ts.SourceFile` of the template text, as this is needed to report Angular
template diagnostics using TypeScript's diagnostics infrastructure. Each
reported diagnostic would create its own `ts.SourceFile`, resulting in
repeatedly parsing of the template text and potentially high memory usage
if the template is large and there are many diagnostics reported. This commit
caches the parsed template in the template mapping, such that all reported
diagnostics get to reuse the same `ts.SourceFile`.

Closes #47470

PR Close #47471
2022-09-21 18:22:23 +02:00
..
bin test: update dynamic-compiler test to be compatible with APF v13 (#43431) 2021-10-01 18:28:46 +00:00
ngtsc perf(compiler-cli): cache source file for reporting type-checking diagnostics (#47471) 2022-09-21 18:22:23 +02:00
transformers refactor(compiler-cli): remove enableIvy options (#47346) 2022-09-06 11:33:48 -07:00
extract_i18n.ts refactor(compiler-cli): remove dependency on minimist (#43644) 2021-10-04 17:31:03 -07:00
main.ts refactor(compiler-cli): remove enableIvy options (#47346) 2022-09-06 11:33:48 -07:00
perform_compile.ts refactor(compiler-cli): remove enableIvy options (#47346) 2022-09-06 11:33:48 -07:00
perform_watch.ts refactor(compiler): delete View Engine components of @angular/compiler (#44368) 2021-12-06 13:12:36 -05:00
typescript_support.ts feat(core): support TypeScript 4.8 (#47038) 2022-08-16 16:02:47 +00:00
version.ts docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00
version_helpers.ts refactor(compiler-cli): move version number helpers out of diagnostics subfolder (#44269) 2021-12-01 10:36:30 -08:00