Answer the question
In order to leave comments, you need to log in
Did you feel the difference between AoT and JIT compilation when working with Angular 2?
I put together a simple hello world and didn't notice the difference between AoT and JIT (in a classic Angular 2 build). And I don't know if the game is worth the candle. According to their benchmarks, they are confident that your applications will now fly:
blog.mgechev.com/2016/08/14/ahead-of-time-compilat...
But after I built the application and compared, the difference is 20ms, and it's worth it? And in general, when can you see a significant difference?
JIT (609ms):
AoT (581ms):
Sometimes the Timeline shows the result better than before (maybe the browser makes optimizations with several updates):
As you can see (if you open the image in a new window), the most time is spent on JS interpretation (minimum 460 ms on average in both cases), that is, we optimized rendering using AoT, but the scripts themselves were as bold as they are. And how this optimization is taken care of is no longer clear, everything will depend on the browser engine, since V8 gives an average of 460ms, I'm afraid to imagine what will happen in other browsers (for example, IE10), or is it not necessary to suffer about this?
I understand that AoT collects before webpack assembly (for example) files in which template, style are already statically assembled and now they will not be calculated on the page, but is it scary, I used to use Angular 1 at all, which is now considered wildly outdated ( due to the digest cycle and other rendering brakes)
It's just that if AoT would be so cool, why in the office. The default documentation does not already suggest using this method as a privileged one?
Answer the question
In order to leave comments, you need to log in
Sorry for the offtopic, but I couldn't resist. I don't see the difference between rendering configured Angular 1 and Angular 2 out of the box. the test also shows this https://auth0.com/blog/updated-and-improved-more-b...
and only one optimization was applied in the test
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question