Skip to content

perf: first use also reads the docs sites - #58

Merged
sylphx-desk-studio[bot] merged 2 commits into
mainfrom
perf/first-use
Oct 3, 2026
Merged

sylphx-desk-studio[bot] merged 2 commits into
mainfrom
perf/first-use

Conversation

@shtse8

@shtse8 shtse8 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

First-use (before lockdocs fetch) never read docs-site repositories, so React 19, Express, tokio and Tailwind answers came from package files only.

Root causes, from the first-use misses (local run, empty isolated cache, no credentials, 97 of 105 questions installable here, pydantic 2 excluded):

  • docs-site not read in automatic mode (13 of the 21 misses): react19-use/ref/context, express4/5-wildcard, tokio-select, tw3-css/source, tw4-css/dark, prisma6-bytes/fts, prisma5-fts. Fix: automatic fetch also reads the site (codeload under the 64 MB cap, else one REST tree request plus raw files; tailwindcss.com is 190 MB and prisma/docs 800+ MB as archives). A site failure keeps the package docs and is noted in the manifest.
  • REST API redirect for a renamed repo (prisma/docs): the automatic client follows no redirects, so the tree call failed. It now follows one redirect to the same API host.
  • Not first-use causes (fetched fails them too, so ranking/source-docs work): next14-cookies, rr6-json, pyd1-config, fa088-lifespan, eslint8-globals, eslint9-plugins (held-out), react18-action, prisma5-bytes.
  • No budget/timeout change: a first try with a 256 MB site cap timed out on tailwindcss.com (30 s, nothing gained), so the cap stays 64 MB and big sites use the per-file path (6.8 s for Tailwind).

First-use column, local, same 97 questions, before -> after: total 76 -> 88; older major 34/45 -> 38/45; newer major 38/47 -> 45/47; single version 4/5 -> 5/5; held-out 13/16 -> 14/16 (react19-context and tw3-source fixed; tw4-source now misses, same as explicit fetch, since the site page outranks the package file). Keyword 55/97 and hybrid 59/97 unchanged. Median latency 122 -> 149 ms, p95 3.4 -> 5.6 s (the one-time site fetch). Context7 not run here.

Floor: bench/run.py first-use-default >= 88/105 (CI to confirm). upstream::FORMAT 6. Caches of format 5 stay trusted; lockdocs fetch refreshes them. cargo test --workspace and clippy -D warnings pass locally.

@shtse8 shtse8 added the owner:sylphx-oss Sylphx OSS lane label Oct 3, 2026
@sylphx-desk-studio
sylphx-desk-studio Bot added this pull request to the merge queue Oct 3, 2026
Merged via the queue into main with commit 5335b89 Oct 3, 2026
8 checks passed
@sylphx-desk-studio
sylphx-desk-studio Bot deleted the perf/first-use branch October 3, 2026 04:49
@sylphx-desk-studio

Copy link
Copy Markdown
Contributor

QA PASS @30cd340 - automatic first-use fetch now also reads docs sites (site failure keeps package docs and notes it in the manifest; explicit fetch still errors); redirect follow is once and same API host only, so the token is not sent elsewhere; two new unit tests plus the bench floor (first-use-default >= 88/105); bench, test (3 OS), manifests/smoke/docs checks completed green; merges cleanly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner:sylphx-oss Sylphx OSS lane

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant