Skip to content

Use keyed pagination for article lists#1972

Closed
jocmp wants to merge 3 commits intomainfrom
jc/keyed-paging
Closed

Use keyed pagination for article lists#1972
jocmp wants to merge 3 commits intomainfrom
jc/keyed-paging

Conversation

@jocmp
Copy link
Copy Markdown
Owner

@jocmp jocmp commented Mar 29, 2026

Replace OFFSET-based paging with SQLDelight's KeyedQueryPagingSource using published date as the keyset key.

Benchmarks show ~8x faster paging across 13k articles (2s down to 250ms)

Replace OFFSET-based paging with SQLDelight's
KeyedQueryPagingSource using published date as the
keyset key.

Benchmarks show ~8x faster paging
across 13k articles (2s down to 250ms)
@jocmp jocmp force-pushed the jc/keyed-paging branch from 96bf872 to ac3bc2d Compare March 29, 2026 01:25
Remove offset-based all() and allNewestFirst/
allOldestFirst SQL from BySavedSearch and ByToday
(kept in ByArticleStatus and ByFeed for tests).

Add keyed pagination tests verifying correct order
for both newest-first and oldest-first across 5
articles with page size of 2.
@jocmp jocmp closed this Mar 29, 2026
@jocmp jocmp deleted the jc/keyed-paging branch March 29, 2026 03:24
@jocmp jocmp restored the jc/keyed-paging branch April 8, 2026 02:33
@jocmp jocmp reopened this Apr 8, 2026
# Conflicts:
#	.claude/skills/bench-profile.md
#	capy/src/main/sqldelight/com/jocmp/capy/db/articlesBySavedSearch.sq
@jocmp jocmp changed the title Use keyset pagination for article lists Use keyed pagination for article lists Apr 8, 2026
@jocmp
Copy link
Copy Markdown
Owner Author

jocmp commented Apr 8, 2026

wrong branch

@jocmp jocmp closed this Apr 8, 2026
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

Successfully merging this pull request may close these issues.

1 participant