Skip to content

High Prio: Might want to use Cursor pagination (search up if you don't know) instead of offset pagination to reduce number of reads when scrolling the home page and paginating fetched posts. #177

Description

@AndrewG828

Offset (?page=10&limit=20): Firestore reads docs 1–200, returns 181–200, bills you for 200 reads for that one page. Page 20 = 400 reads. Cost grows linearly with depth.

Cursor (?cursor=...&limit=20): Firestore jumps to the cursor and reads 20 docs, bills 20 reads. Same cost on page 1, page 10, or page 1,000.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions