-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something is strange for angular and partial update #690
Comments
I can't replicate the issue without CPU throttling. Here are a few results: With startMeasure/stopMeasure: Without startMeasure/stopMeasure: |
Nevertheless I decided to remove all startMeasure/stopMeasure calls. There are gone now for all keyed implementations. |
It's really confusing. Adding startMeasure/stopMeasure makes angular-ng as fast as angular. |
whether Closure Compiler helps or hurts perf is really dependent on the code being compiled. really any minifier that non-deterministically inlines functions for byte size reduction suffers from this in the absence of explicit annotations. a single character change may exclude a function from being inlined, or force it to be inlined, which can easily have a large effect on how JITs behave at runtime. google/closure-compiler#2751 for instance, in domvm Closure was always inlining syncChildren [1] since there was only a single callsite for it. this bloated the containing function enough where the JIT bailed on it and perf dropped significantly. since then i use terser and disable inlining globally. in the long term it has been beneficial. the perf benefits of keeping functions isolated and JIT-able outweighs the meager byte savings attained by inlining. [1] https://github.com/domvm/domvm/blob/master/src/view/syncChildren.js#L103 |
I'm closing this issue since I currently can't build angular 11 with closure. |
I tried to create a new angular version with angular cli (currently labeled angular-ng) since the closure build doesn't work on windows. It'a pretty much as fast as the committed angular version with the exception of partial update.
This was strange since the application code and template was basically the same, except the committed angular version still included the much discussed and little beloved startMeasure / stopMeasure calls.
Adding and removing those in the respective version lead to the following result:
The upper measurement is with startMeasure and stopMeasure calls and the lower without.
Sounds very odd.
I then removed all of those measurements to see if other frameworks have the same issue:
Seems like only angular and angular-ng are affected (and you can notice that for angular the difference is much smaller than in the example above).
The text was updated successfully, but these errors were encountered: