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

Add cursor-based pagination #1197

Merged
merged 12 commits into from Feb 5, 2019
Merged

Add cursor-based pagination #1197

merged 12 commits into from Feb 5, 2019

Conversation

rafalp
Copy link
Owner

@rafalp rafalp commented Jan 20, 2019

This PR adds misago.core.cursorpaginator.CursorPaginator utility for implementing cursor pagination in Misago.

Fixes #1066

TODO

  • Create pagination util
  • Move threads lists to cursor pagination
  • Remove MISAGO_THREADS_TAIL setting (from settings.py and docs)
  • Move user posts/threads/username history lists to cursor pagination

@rafalp rafalp added area: backend This issue involves Python, Django or dependency (eg. database) new feature New feature labels Jan 20, 2019
@rafalp rafalp added this to the 0.20.0 milestone Jan 20, 2019
@rafalp rafalp self-assigned this Jan 20, 2019
@rafalp rafalp changed the title Add utility for cursor-based pagination Add cursor-based pagination Jan 20, 2019
@rafalp rafalp added enhancement Improvement to existing feature or dev experience and removed new feature New feature labels Jan 20, 2019
@rafalp
Copy link
Owner Author

rafalp commented Feb 2, 2019

Observation after quick tests:

On larger dataset (130k threads) cursor based pagination is 20x faster than offset pagination, returning results in 5ms vs 100ms.

@rafalp
Copy link
Owner Author

rafalp commented Feb 5, 2019

Note: for now I am skipping the search, because its ordering the results by accuracy. I'll revisit it down the road.

@rafalp rafalp merged commit c3ce882 into master Feb 5, 2019
@rafalp rafalp deleted the add-cursor-paginator branch February 5, 2019 19:18
@rafalp rafalp mentioned this pull request Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend This issue involves Python, Django or dependency (eg. database) enhancement Improvement to existing feature or dev experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant