The Potential Pitfalls of Pagination

https://programming.dev/post/18303863

The Potential Pitfalls of Pagination - programming.dev

Fairly lame article but yeah this is something lemmy used to get wrong. I haven’t paid attention to whether it still does.

They fixed this in version 0.19 pr #3872 (note that the cursor here is a way of hiding a post ID to continue from, as far as I can see).

Also, lame article? 😖

Fix Posts List Performance + cursor-based pagination by phiresky · Pull Request #3872 · LemmyNet/lemmy

This PR implements two things: Cursor-based pagination for the /posts/list API request. A new opaque parameter page_v2 is added that fetches the next page based on the previous one. The request n...

GitHub

Also, lame article? 😖

It’s pretty short, it could be improved with benchmarks or at least some examples of how that would be implemented efficiently. Maybe a bit of pros and cons, cursor pagination for example doesn’t handle “go directly to page 200” very well. I’ve also seen some interesting hacks to make offset pagination surprisingly fast with a clever subquery.

I wouldn’t call it lame though.

Now we’re judging articles for quantity instead of quality?