Files
angular__angular/packages/compiler-cli
JoostK a4b66fe1e5 perf(compiler-cli): cache source file for reporting type-checking diagnostics (#47508)
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 #47508
2022-09-28 14:08:25 -07:00
..
2022-07-08 20:54:52 +00:00