TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Potential Pitfalls of Pagination

17 点作者 bubblehack3r9 个月前

3 条评论

slowmovintarget9 个月前
Back in my J2EE days I knocked out a paginator server-side component that constructed a guaranteed ordering of items. This paginator stored its paging state in memcached with a consistent hash for a key in order to share paging indices among similar requests. Staleness was handled with a periodic check for additional result, or cache expiration after a while. The client had to handle the stale check and the &quot;oops, sorry, let me refresh the paged list...&quot; after idle. This was only suitable for roughly half the use cases.<p>It was complex, but it worked. Thank goodness I didn&#x27;t have to deal with infinite scrolls back then.
huem0n9 个月前
Good article, I do wish it would talked about big-O and arbitrary sort orders.<p>Let&#x27;s say there&#x27;s lots of columns&#x2F;fields to sort by. Not quite an arbitrary sort (e.g. can&#x27;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?<p>Getting around the deleted-anchor problem with ordered-ID&#x27;s seems like just using ID&#x27;s as a index. Not a bad trick, but seems like it isn&#x27;t generalizable for all different kinds of sorts.
评论 #41292106 未加载
评论 #41292940 未加载
mjcurl9 个月前
I&#x27;ve been facing the issue of shifting data with the eBay browse api. Unfortunately they don&#x27;t offer ID based pagination. What&#x27;s the best way to deal with it, manually track queried data yourself?
评论 #41292150 未加载