6 ms·
Excited to see the bind once expression introduce.
by keda 12y ago
Excited to see the bind once expression introduce.
- davej 12y agoYes, this is a big deal for performance! Having to run through 1000s of watchers in a digest cycle is not unusual with a typical Angular site and oftentimes most of those watchers are redundant.
- never_snapped 12y agoAre there any benchmark results available? They mention it increased speed, by a lot, but don't give any numbers -- instead point to a code repo where you can run your own. This is great, but I want an "at a glance" numbers on a variety of platforms so I can verify their claim and then take it to my boss to push through an upgrade. An "executive summary" if you will.
- pteredactyl 12y agoIf you read the post you'll see a link to benchmark scores
- crucialfelix 12y agothere are no results there, just the code to run. I also looked for it.
- skeletonjelly 12y agoI still don't get what this will be for. Detail pages?
- thebenedict 12y agoYou can use it anywhere but it'll be especially helpful for long lists. Angular binds anything in double curlies, creating watchers that dirty check and evaluate with every digest cycle. It's tempting (and IMO Angular incorrectly encourages users) to use double curlies for templating everwhere, so in typical list views you can end up with thousands of watchers on data that never needs to change once the page is rendered. This is slow, especially for searching and sorting. Further reading[1] Before this release it's been necessary to write custom directives or use a tool like Bindonce[2] to turn off data binding where it's not needed. [1] http://tech.small-improvements.com/2013/09/10/angularjs-performance-with-large-lists/ http://tech.small-improvements.com/2013/09/10/angularjs-perf... [2] https://github.com/Pasvaz/bindonce https://github.com/Pasvaz/bindonce