Scroll-aware request debouncing
Avoids requesting every block the user scrolls past at high speed. It waits until scrolling settles, or until velocity drops below a threshold, before fetching the blocks it lands on. This cuts wasted server load from scrollbar drags.
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
Debounce is 120 ms, and a request counter is shown.
Expected behavior
With debounce, a fling produces about 1-2 requests. With debounce at 0, the counter shows dozens of requests, and the log shows them being cancelled.
Planned API surface
option: scrollFetchDebounceMsoption: scrollVelocityThresholdevent: fetchSkippedAcceptance criteria
- While velocity is above the threshold, no new visible requests are issued. (pending)
- Fetching starts within debounce ms of the scroll settling. (pending)
- Keyboard navigation (arrow keys, Page Up/Down) is not debounced beyond one frame. (pending)
- fetchSkipped reports the block ranges that were skipped. (pending)