Web Vitals & Performance (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)
DOM Virtualization & Windowing for 10,000+ Items.
senior LevelSystem Design
In Simple Words:
Rendering 5,000 DOM nodes simultaneously consumes hundreds of megabytes of RAM and causes catastrophic style recalculation lag. Virtualization (e.g. react-window or virtual-scroller) calculates which items fit in the visible viewport (e.g. 15 items) and recycles a fixed pool of DOM elements as the user scrolls, maintaining 60 FPS scrolling regardless of list size.