Skip to content

perf: speed up history, reports, and evidence processing - #64

Merged
voltcrash merged 14 commits into
mainfrom
t3/tracera-performance
Oct 25, 2026
Merged

voltcrash merged 14 commits into
mainfrom
t3/tracera-performance

Conversation

@voltcrash

Copy link
Copy Markdown
Owner

History loading queried and hydrated a full report for every sidebar item, and report pages shipped the report schema and raw artifacts to the browser. Evidence processing also repeated source scans, serialization, and sequential blob reads.

This PR adds stored history summaries and one-query history reads, projects report display data on the server, narrows progress polling, and reuses report snapshots for evidence excerpts. It also bounds parallel R2 snapshot reads, reuses canonical JSON, indexes source-dependence lookups and the complete history sort order, and preloads the interface font. The work is split into 14 focused Conventional Commits.

Local measurement Before After
History for 30 runs 31 D1 queries 1 D1 query
Report route JS 153.87 kB / 42.36 kB gzip 18.03 kB / 5.00 kB gzip
Complete fixture report transport 9,974 bytes 2,650 bytes
Source grouping, 300 synthetic sources 89.7 ms median 8.7 ms median

Source-grouping timings use three warmups and nine samples, with old/new output equality checked. These are local workload measurements, not hosted end-to-end latency or provider accuracy claims. vp run benchmark:performance and docs/performance.md provide reproduction details.

Validation:

  • vp check, vp test --run — 510 tests, vp run check-types, and vp run build passed.
  • vp run test:browser — all 19 Chromium tests passed.
  • vp run web#deploy:staging-dry-run passed.
  • Evidence, provenance, and release fixture evaluations each passed all 7 cases; their empirical release gates remain unevaluated or blocked.
  • Regression coverage verifies one-query history, indexed ordering, ownership scope, bounded blob concurrency, root precedence, display streaming, and preservation of existing report bytes and hashes during migration.

Apply D1 migrations 0003 and 0004 before deploying the Worker through the existing deployment workflow. Inline legacy reports are backfilled; legacy R2 reports retain the full-report fallback when their summary is absent. The default progress endpoint keeps its full-report response, and the UI opts into ?view=report.

@voltcrash
voltcrash merged commit d9b9e2f into main Oct 25, 2026
1 check passed
@voltcrash
voltcrash deleted the t3/tracera-performance branch October 25, 2026 19:23
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