Performance: Unordered lists
MEDIUM IMPACT
Unordered lists affect the DOM size and rendering time, especially with many list items.
<ul> <li>Item 1</li> <li>Item 2</li> <!-- only 10 items shown, others loaded on demand --> </ul>
<ul> <li>Item 1</li> <li>Item 2</li> <!-- repeated 1000 times --> </ul>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Large unordered list (1000 items) | 1001 nodes | Many reflows | High paint cost | [X] Bad |
| Small unordered list (10 items) | 11 nodes | 1 reflow | Low paint cost | [OK] Good |