Skip to content

Consider using more performant pagination using a pointer to last ID #61

@ihorvorotnov

Description

@ihorvorotnov

Is your enhancement related to a problem? Please describe.

Page based pagination using slicing is convenient but also not the most performant option due to how GROQ works. Quoting Sanity:

While GROQ makes this super easy, this is actually surprisingly inefficient.

Generally, you can expect slicing performance to be roughly linear relative to the slice range. For example, if the range 100...200 takes 5ms to run, then you can expect 200...300 to take about 10ms, 300...400 to take 15ms, and so on.

This guide provides more details and suggests a more efficient approach: https://www.sanity.io/docs/developer-guides/paginating-with-groq

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions