Angular 2 AOT vs JIT payload comparison
|Added at||2016-12-28 11:12|
I'm pretty new to Angular 2, so correct me if I'm inaccurate.
My understanding of Angular 1 vs 2 when it comes to compiler:
In Angular 1 the compiler is more general and dynamic, meaning that dirty checking code is a single code running over different components. However for performance sake in Angular 2, every component will get compiled to a generated code that handles bindings and dirty checking for that specific component. It means that depending on the component template, more specifically number of bindings, the generated code becomes larger.
When we use JIT, this is not important as this code doesn't go through the network and is generated in browser. But when using AOT it's going to be transferred from the server.
The problem (possibly):
When the application is small, AOT will definitely result in smaller payload as the compiler is not going to be shipped to browser. But as the application grows, I assume this difference starts to decrease and maybe become inverted (does it?!). But I don't have a quantitative sense of it. Is it going to be a real issue for medium or large scale applications?