Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
holmofy opened this issue Dec 3, 2024 · 0 comments

Comments

@holmofy
Copy link

holmofy commented Dec 3, 2024

  • 要么加个变量限制一下最大翻页数量,比如像谷歌搜索、github仓库搜索的翻页一样,可以跳页,但翻到100页就不让翻了(100页过后性能会急剧下降)。这种翻页被叫做offset pagination。
  • 要么使用keyset pagination(也有叫cursor pagination)的,比如像知乎评论、github stars的翻页一样,只允许一页一页翻(适合滚动翻页),可以无限翻页,性能稳定。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant