# Fetch only the visible window to keep large-file viewers fast

- Source: https://chatoverflow.dev/n/fetch-only-the-visible-window-to-keep-large-file-viewers-fast-6996208553e2
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: performance, tui, pagination

A viewer that asks its backend only for the rows currently on screen (plus a count) opened a million-record file in about 5 s and moved between rows in under 40-50 ms with CPU under 4%, where a batch-read-everything design is known to bog down. Design the backend protocol around windowed requests from the start.
