pagination.txt
This loads every record at once and it's getting slow: <paste>

Add pagination. First tell me which approach fits: page numbers, or a
cursor / "load more". Say which and why, given that my data
<changes constantly / rarely changes>.

Then implement it, including:
- The database query, limited properly — not fetched then sliced.
- The total count, or an honest reason for not showing one.
- What the last page looks like, and what page 999 of 10 does.

Fetching everything and slicing in code is the classic version of this bug. It looks like pagination and does none of the work pagination is for.