Skip to content

Fetch 20 search results a page instead of 30 - #3428

Merged
enf0rc3 merged 1 commit into
mainfrom
willlaugesen/search-page-size-20
Aug 30, 2026
Merged

Fetch 20 search results a page instead of 30#3428
enf0rc3 merged 1 commit into
mainfrom
willlaugesen/search-page-size-20

Conversation

@enf0rc3

@enf0rc3 enf0rc3 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Each row the search overlay draws costs a fragment fetch, so PAGE_SIZE is what a query pays before it can show anything. Dropping it from 30 to 20 cuts that by a third.

Twenty still leaves byNameThenDepth enough of the list to reorder, and the shallow-page promotion that rescues a page ranked past the page size is untouched. Two comments that quoted the old number are corrected.

Pagefind is left alone. This is the cheap part of the search speed-up, split out from #3408 so it can land on its own.

All 30 tests in tests/docs-search.spec.ts pass, including the three that depend on the page size: "scrolling to the end of the results loads more", "a page pulled forward is not listed again further down", and "the page a query names comes first".

🤖 Generated with Claude Code

Each row in a page costs a fragment fetch, so the page size is what a
search pays before it can draw anything. Twenty still gives
byNameThenDepth enough of the list to reorder, and a reader who has
scrolled past twenty rows is better served by a narrower query.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@team-marketing-branch-protections

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3428.z22.web.core.windows.net.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.

@enf0rc3
enf0rc3 merged commit 137aeaa into main Aug 30, 2026
9 checks passed
@enf0rc3
enf0rc3 deleted the willlaugesen/search-page-size-20 branch August 30, 2026 23:11
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.

3 participants