Hacker News new | ask | show | jobs
by keda 4260 days ago
Excited to see the bind once expression introduce.
2 comments

Yes, 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.

Are 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.
If you read the post you'll see a link to benchmark scores
there are no results there, just the code to run. I also looked for it.
I still don't get what this will be for. Detail pages?
You 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-perf...

[2] https://github.com/Pasvaz/bindonce