The Large List Rendering Problem
Understand why rendering 10,000 DOM nodes tanks performance and how virtualization solves it.
The Large List Rendering Problem is a free React Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the React Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Rendering 10000 li Elements
Suppose you map over an array of ten thousand items and render a li for each. React will dutifully create ten thousand DOM nodes, even though only a couple dozen fit on screen at once.
Most of those nodes are off-screen and invisible, yet the browser must still create, lay out, and maintain every one of them.
Browser Layout Cost for Large DOM Trees
The browser pays a real cost for large DOM trees. Layout, style recalculation, and memory all scale with node count, so a huge list slows initial render and inflates memory usage.
Even simple interactions can stutter when the engine has tens of thousands of nodes to track and reflow.
Scroll Performance Degradation
Scrolling a massive list is where users feel the pain most. The browser repaints and may recompute layout as content moves, and with too many nodes the frame rate drops below smooth.
The result is janky, laggy scrolling that makes the interface feel unresponsive no matter how fast the rest of the app is.
Measuring Node Count in DevTools
You can confirm the problem in the browser DevTools Memory panel, which reports the number of DOM nodes on the page. A list that creates thousands of nodes shows up clearly here.
Watching that count balloon as you render more items gives you concrete evidence that the DOM size is the bottleneck.
The Virtualization Concept
Virtualization, sometimes called windowing, renders only the items currently visible plus a small buffer, rather than the entire list. As you scroll, items entering view are mounted and those leaving are unmounted.
This keeps the live DOM tiny regardless of how many items the data contains, decoupling DOM size from dataset size.
Computing the Visible Window
The visible window is derived from the scroll position, the container height, and the item height. Dividing the viewport height by item height gives roughly how many rows fit, and scroll offset tells which rows those are.
The library uses these numbers to decide exactly which slice of items to render at any moment.
react-virtualized vs react-window vs TanStack Virtual
Several libraries implement windowing. react-virtualized is feature-rich but larger, react-window is a smaller, focused rewrite by the same author, and TanStack Virtual is a modern headless option.
For most lists, react-window offers an excellent balance of simplicity and performance, which is why this course focuses on it.
When Virtualization Is Necessary
Virtualization pays off when lists are long, roughly several hundred rows or more, or when rows are heavy with images and nested components. Those are the cases where DOM size genuinely hurts.
Infinite feeds, large data tables, and chat histories are typical scenarios where windowing becomes essential rather than optional.
When It Is Not Worth It
For short lists of a few dozen simple items, virtualization adds complexity without meaningful benefit. The absolute positioning and measurement overhead can even be a net negative.
Reserve windowing for genuinely large datasets; for small ones, a plain map is simpler and perfectly fast.
The Payoff
With windowing, a list of a hundred thousand items keeps only the visible handful in the DOM, so initial render is fast, memory stays low, and scrolling is smooth.
You trade a little complexity in setup for performance that no longer depends on how much data you have, which is the core promise of virtualization.
Quick Check: When to Virtualize
Decide when virtualization is worthwhile.
Recap: The Large List Problem
Rendering thousands of DOM nodes inflates layout cost, memory, and scroll jank, which you can confirm via the DevTools node count. Virtualization renders only the visible window plus a buffer, keeping the DOM small.
react-window is a focused, lightweight choice among react-virtualized and TanStack Virtual. Use it for large or heavy lists, and skip it for short, simple ones.
Frequently asked questions
Is the “The Large List Rendering Problem” lesson free?
Yes — the full text of “The Large List Rendering Problem” is free to read here on the web, and the React Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the React Academy course, upgrade to CoddyKit PRO.
What will I learn in “The Large List Rendering Problem”?
Understand why rendering 10,000 DOM nodes tanks performance and how virtualization solves it. You practise React Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start React Academy?
No prior experience is required. React Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “The Large List Rendering Problem” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this React Academy lesson?
Yes. Every React Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- The Large List Rendering Problem
- FixedSizeList: Rendering Thousands of Items
- VariableSizeList: Dynamic Row Heights
- Combining Virtualization with Data Fetching