The Potential Pitfalls of Pagination(jade.ellis.link) |
The Potential Pitfalls of Pagination(jade.ellis.link) |
It was complex, but it worked. Thank goodness I didn't have to deal with infinite scrolls back then.
Let's say there's lots of columns/fields to sort by. Not quite an arbitrary sort (e.g. can't sort by area when given a width and height column) but its still pretty flexible. Is is possible to get a O(1) pagination while avoiding the rolling-shutter problem and deleted-anchor problem?
Getting around the deleted-anchor problem with ordered-ID's seems like just using ID's as a index. Not a bad trick, but seems like it isn't generalizable for all different kinds of sorts.
The tradeoff here is now you've got to keep that copy around - your server has to maintain some kind of state, you've got to garbage collect unused snapshots and it's impractical to scale this to millions of items.
[0]: https://old.reddit.com/r/programming/comments/1ev9hha/the_po...