Artalk icon indicating copy to clipboard operation
Artalk copied to clipboard

评论过多后,深翻页问题。一个页面有几万条评论后,往后翻页查询性能会下降。

Open holmofy opened this issue 1 year ago • 0 comments

  • 要么加个变量限制一下最大翻页数量,比如像谷歌搜索、github仓库搜索的翻页一样,可以跳页,但翻到100页就不让翻了(100页过后性能会急剧下降)。这种翻页被叫做offset pagination。
  • 要么使用keyset pagination(也有叫cursor pagination)的,比如像知乎评论、github stars的翻页一样,只允许一页一页翻(适合滚动翻页),可以无限翻页,性能稳定。

holmofy avatar Dec 03 '24 08:12 holmofy