This article is part of my “Angular Performance Week” series, where I publish a new video each day based on the performance articles on web.dev/angular.
Note: this article and attached Egghead video lesson are based on the articles on web.dev/angular by Minko Gechev and Stephen Fluin. Full credit goes to them :thumbsup:
Angular Performance Series
- Route Level Code Splitting
- Preload Lazy Routes in Angular
- Performance budgets with the Angular CLI
- Optimize Angular’s Change Detection
- Virtual Scrolling for large lists with the CDK
- Precaching with the Angular Service Worker
Don’t miss the other videos by subscribing to my newsletter.
Leverage the Angular CDK to implement virtual scrolling
Browsers become faster every day, but still, DOM updates are costly. If we have large lists, the browser needs to render them upfront, creating hundreds if not thousands of DOM nodes, even though the user might not scroll that far down the list. Not only does this slow down the scrolling itself, but even the page load of our app can suffer from it. To optimize this experience, we can use virtual scrolling, in particular, in this lesson we’re using Angular’s CDK to implement that.
Original web.dev article
Wanna read the original web.dev article? Check it out here!.