Skip to content

perf(docs): prefetch the mirror bundle before a first search - #82

Merged
m1ngsama merged 2 commits into
mainfrom
perf/docs-bundle
Sep 26, 2026
Merged

m1ngsama merged 2 commits into
mainfrom
perf/docs-bundle

Conversation

@m1ngsama

Copy link
Copy Markdown
Member

A first docs search downloaded all 247 documents one by one: 40 s and 248 requests on this network.

  • Search prefetches the whole library from docs.nbtca.space/docs-api/bundle.json through @nbtca/docs 0.3.4 when more than a handful of documents are uncached, then loads only what's still missing.
  • A cold search drops from 40 s / 248 requests to 6.6 s / 2 requests; warm searches are unchanged.
  • The progress counter starts at the number already available, so it no longer climbs through documents that arrived in the bundle.

@m1ngsama
m1ngsama merged commit 268f970 into main Sep 26, 2026
4 checks passed
@m1ngsama
m1ngsama deleted the perf/docs-bundle branch September 26, 2026 16:33
@m1ngsama m1ngsama mentioned this pull request Sep 26, 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