WarUI

Prefetch and overscan blocks

GRID-A04-F06P1baselinePlanned

Fetches blocks ahead of the viewport in the direction of scroll so data is usually ready before it becomes visible. Prefetch depth adapts to scroll direction and is capped so that prefetch does not starve visible requests.

Planned. This page shows the specification from issue #180. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

prefetchBlocks is 1, direction-aware prefetch is on, and latency is 600 ms.

Expected behavior

Scrolling down issues prefetch requests for the blocks below, labelled 'prefetch' in the log. With prefetch set to 0, placeholders are visible on every Page Down. Reversing direction moves prefetch upward.

Planned API surface

option: prefetchBlocksoption: prefetchDirectionAwarerequest.priority: 'visible'|'prefetch'event: prefetchIssued

Acceptance criteria

  • Visible requests always take priority over queued prefetch requests. (pending)
  • Prefetch never fetches beyond a known totalCount. (pending)
  • Prefetched blocks still count toward maxCachedBlocks. (pending)
  • With prefetchBlocks set to 0, no prefetch-priority requests are issued. (pending)