angular-docs-cn/packages/compiler/test/output
Tobias Bosch edd5f5a333 perf(compiler): make the creation of `ts.Program` faster. (#19275)
We now create 2 programs with exactly the same fileNames and
exactly the same `import` / `export` declarations,
allowing TS to reuse the structure of first program
completely. When passing in an oldProgram and the files didn’t change,
TS can also reuse the old program completely.

This is possible buy adding generated files to TS
in `host.geSourceFile` via `ts.SourceFile.referencedFiles`.

This commit also:
- has a minor side effect on how we generate shared stylesheets:
  - previously every import in a stylesheet would generate a new
    `.ngstyles.ts` file.
  - now, we only generate 1 `.ngstyles.ts` file per entry in `@Component.styleUrls`.
  This was required as we need to be able to determine the program files
  without loading the resources (which can be async).
- makes all angular related methods in `CompilerHost`
  optional, allowing to just use a regular `ts.CompilerHost` as `CompilerHost`.
- simplifies the logic around `Compiler.analyzeNgModules` by introducing `NgAnalyzedFile`.

Perf impact: 1.5s improvement in compiling angular io
PR Close #19275
2017-09-19 16:55:23 -07:00
..
abstract_emitter_node_only_spec.ts refactor(compiler): make `OutputAst` contain the moduleName, not the filePath (#16832). 2017-05-23 10:41:23 -06:00
abstract_emitter_spec.ts feat: introduce source maps for templates (#15011) 2017-03-14 09:16:15 -07:00
js_emitter_node_only_spec.ts refactor(compiler): make `OutputAst` contain the moduleName, not the filePath (#16832). 2017-05-23 10:41:23 -06:00
js_emitter_spec.ts fix(compiler): emits quoted keys only iff they are quoted in the original template 2017-07-07 16:17:33 -07:00
output_ast_spec.ts perf(compiler): make the creation of `ts.Program` faster. (#19275) 2017-09-19 16:55:23 -07:00
output_jit_spec.ts refactor(compiler): split compiler and core (#18683) 2017-08-16 17:58:53 -05:00
source_map_spec.ts fix(compiler): Update types for TypeScript nullability support 2017-04-10 15:26:33 -06:00
source_map_util.ts fix(compiler): Update types for TypeScript nullability support 2017-04-10 15:26:33 -06:00
ts_emitter_node_only_spec.ts refactor(compiler): make `OutputAst` contain the moduleName, not the filePath (#16832). 2017-05-23 10:41:23 -06:00
ts_emitter_spec.ts fix(compiler): emits quoted keys only iff they are quoted in the original template 2017-07-07 16:17:33 -07:00