Angular 9: How Would You Compare View Engine vs Ivy?

Technology CommunityCategory: AngularAngular 9: How Would You Compare View Engine vs Ivy?
VietMX Staff asked 3 years ago

View Engine has been introduced with Angular version 4 and still used in version 8, but some limitations have been identified

  • no tree-shakable: both the Hello World application and a very complex one are executed by the same and full runtime. If the internationalization module is not used, for instance, it is part of the runtime anyhow, basically the runtime it cannot be tree-shakable;
  • no incremental compilation: Angular compilation is global and it involves not only the application but also the libraries.

Ivy will the new default rendering engine starting from version 9 and should solve the View Engine current issues:

  • simplify how Angular works internally;
  • tree-shakable the Hello World application does not require the full Angular runtime and will be bundled in only 4.7 KB;
  • incremental compilation is now possible so the compilation is faster than ever and --aot can be now used even during development mode (advice from Angular team).