Skip to content

perf: accelerate incremental API indexing - #7

Merged
cmilesio merged 3 commits into
mainfrom
perf/harden-api-index-cache
Jul 21, 2026
Merged

perf: accelerate incremental API indexing#7
cmilesio merged 3 commits into
mainfrom
perf/harden-api-index-cache

Conversation

@cmilesio

Copy link
Copy Markdown
Member

What

  • Add RunCached with content-validated persistent artifacts and incremental typed-schema reuse.
  • Parallelize deterministic source parsing and limit package work to selected contracts.
  • Publish unchanged-only artifacts under crash-safe platform locks and scavenge only provenance-marked temporary files.
  • Add a representative 326-file regression fixture and refresh the recorded framework benchmark snapshot.

Why

Typed schema loading made large API indexes take seconds. This restores a fast development loop without reusing stale output after source, dependency, environment, local-replacement, cache-corruption, or concurrent-publication changes.

Validation

  • Root, docs, and examples tests/vet/tidy; root race and coverage passes.
  • Compile checks for Darwin, Windows, AIX, Plan 9, JS/Wasm, and WASI.
  • Representative medians: 19.9 ms exact hit; 84.8 ms controller edit.
  • Fresh seven-sample HTTP benchmark recording and deterministic SVG verification.

Compatibility and operations

RunCached is additive, Run remains available, and the minimum Go version is unchanged. Publication now retains .webindex-artifacts.lock in output directories. Case-only artifact destinations are rejected because they alias on common filesystems; use unambiguously distinct names. Unsafe build configurations fall back to uncached indexing. JS/WASI publication locking is process-local because those targets expose no portable crash-safe cross-process lock.

@codecov-commenter

codecov-commenter commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.21569% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
webindex/index_cache_build_identity.go 92.61% 8 Missing and 5 partials ⚠️
webindex/artifact_lock.go 54.54% 3 Missing and 2 partials ⚠️
webindex/artifact_lock_flock.go 60.00% 2 Missing ⚠️
webindex/index_cache.go 50.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@cmilesio
cmilesio force-pushed the perf/harden-api-index-cache branch from 9a30069 to a75399b Compare July 21, 2026 07:37
@cmilesio
cmilesio merged commit b71879c into main Jul 21, 2026
3 checks passed
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.

2 participants