The Angular 2 Compiler
summary
Describes building an Angular 2 compiler that iterates from a DOM-cloning approach to generated view classes and server-side codegen, using document.createElement for fast DOM construction and an output AST to emit TypeScript/ES5. Benchmarks: deep-tree benchmark (512 components) shows ratios drop from ~5.7 (Angular 1) to 2.7 with hidden-class optimisations, to 1.5 with generated views; ahead-of-time compilation removes eval, cuts load time ~3x and minified gzip from 144KB to 49KB.
AI-written summary · about
chapters (11)
- 0:00Introduction to the compiler
- 1:04Performance benchmarks
- 2:02Understanding compiler inputs
- 3:44Template parsing and AST
- 6:09Instantiating the DOM
- 9:11Change detection mechanism
- 12:25View structure optimization
- 15:34Code generation evolution
- 18:10Ahead-of-time compilation
- 20:15Compiler demo and future
- 23:23Conclusion and summary
