Loop count

Web applications of any kind are often filled with loops. It could be a loop on products for Amazon.com, a loop on your transactions for your bank website, a loop on your phone calls for your phone carrier website, and so on. Worst of all, you can have many loops on a page. When these loops iterate over static collections, it sure takes time to process when the page is being generated, unless there is nothing you can do about it. You can still apply the patterns we saw earlier in this chapter to reduce your collection depth and to save on heavy calls made on a per-item basis. Where real performance problem arise, however, is when these loops are bound to a collection that evolves asynchronously. Indeed, Angular, and all frameworks ...

Get Angular Design Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.