3 ms·
I'd like to see some data indicating there is actually an appreciable performance difference. Indeed, with only one line of code to add, the setup cost is low,
by gamache 10y ago
I'd like to see some data indicating there is actually an appreciable performance difference. Indeed, with only one line of code to add, the setup cost is low, but this article asserts a performance gain without any evidence.
- aaronbrethorst 10y agoThe official Angular docs describe it thusly: You may want to disable this in production for a significant performance boost https://docs.angularjs.org/api/ng/provider/$compileProvider https://docs.angularjs.org/api/ng/provider/$compileProvider I'm inclined to believe the engineers who wrote the docs on this.
- Bahamut 10y agoA Twitter engineer mentioned this in a lightning talk in the AngularJS SF meetup a little more than a year ago - he mentioned that he found speed gains of about 33% with that one line. It's a great tool to have in your belt for optimizing angular apps, most people working with angular are not aware of this unfortunately.
- MaulingMonkey 10y agoI'd be inclined not to believe even myself, had I wrote such a thing, without hard data. Even if I was right then, things may have changed. And just what constitutes significant, anyways?
- visural 10y agoNot a very rigorous test - but I just applied this to one of our (very) large angular 1.x apps and it had a consistent 20-30% reduction in profiled execution time across the couple of test interactions I did. That said, I'm not sure it made much perceptible difference as the app already performed adequately and the reduction is amortized across all of the interactions the user makes.
- gog 10y agoIf you tested on your machine, I hope you factored in that your users may not have an up to date machine.