33 Virtualized Overscan. 33 of 95.

33/SCROLL BEHAVIOR/33 of 95

Virtualized Overscan

Render a little beyond the edge so scrolling never blanks.

The problem

Rendering only exactly-visible rows means fast scrolls outrun rendering and flash blank gaps.

The solution

An overscan buffer renders rows just outside view; adaptive overscan grows the buffer during fast scroll.

Experiment

Play with the values

4
1.5

How it works

  • The viewport and row height define how many rows can be seen at once.
  • The visible index range is computed from the scroll offset.
  • An overscan buffer adds rows just outside that range.
  • The buffer grows with scroll velocity so a fast flick does not run into blank space.
  • Only that window is rendered.
  • Rows are recycled as the window moves, instead of mounting the whole list.

Seen in

Data grids

Thousands of rows scroll smoothly by rendering only a window plus buffer.

Chat history

Long message lists stay performant without blank gaps.

File explorers

Huge directories render just what's near the viewport.

Feeds

Infinite content lists keep memory low while scrolling fast.

References