Skip to content

Performance baseline#140

Merged
dlrice merged 13 commits intomainfrom
performance-baseline
Apr 29, 2026
Merged

Performance baseline#140
dlrice merged 13 commits intomainfrom
performance-baseline

Conversation

@dlrice
Copy link
Copy Markdown
Contributor

@dlrice dlrice commented Apr 28, 2026

Addresses:
Performance: define baseline metrics and profiling workflow #100

Adds bench/ for repeatable performance baselines. Three layers, no src/ changes:

  • Bundle size — raw + gzipped totals from dist/.
  • Lighthouse CI — vite preview against three UniProt scenarios (P05067, P38398, A0A2K5ULD0), 5 runs/URL.
  • Custom milestones — bench/instrument.js (loaded on ?bench=1) emits fetch-and-parse / render / total via MutationObserver; Lighthouse captures them via user-timings.

Adds @lhci/cli devDep.

Purpose

Repeatable, documented perf measurement so the upcoming config refactor can be evaluated against a stored baseline. Satisfies the perf-baseline issue's acceptance criteria.

Approach

yarn bench runs all three layers and writes bench/results/summary.md. Reference snapshots are committed under bench/baselines/; per-run output is gitignored.

Custom marks observe DOM transitions on the host (loader removed → data loaded; nightingale-manager present → first render; 250 ms of subtree quiescence → tracks settled).

Testing

  • Ran yarn bench end-to-end; values stable, scenarios differentiate as expected (fetch-and-parse scales with payload; TBT catches canvas-paint cost the observer can't see).
  • node --check on all scripts; smoke-tested summarize.mjs against a synthetic LH report.
  • Captured bench/baselines/summary-pre-config-<sha>.md.

Visual changes

None. Demo renders identically without ?bench=1.

Checklist

  • My PR is scoped properly, and "does one thing only"
  • I have reviewed my own code
  • I have checked that linting checks pass and type safety is respected
  • I have checked that tests pass and coverage has at least improved, and if not explained the reasons why
  • If needed, the changes have been previewed by all interested parties.

dlrice and others added 11 commits April 28, 2026 17:40
Introduces bench/ for capturing baselines before/after future refactors.
Three layers, no src/ changes:

* Bundle size — walks dist/ for raw + gzipped totals.
* Lighthouse CI — runs the demo via vite preview against three UniProt
  scenarios (P05067, P38398, A0A2K5ULD0); 5 runs per URL, median reported.
* Custom milestones — bench/instrument.js (loaded only on ?bench=1)
  uses MutationObserver on the host to mark fetch-and-parse, render,
  and total. Lighthouse captures these via its user-timings audit.

Adds @lhci/cli devDep.
@dlrice dlrice merged commit e8b5b4d into main Apr 29, 2026
2 checks passed
@dlrice dlrice deleted the performance-baseline branch April 29, 2026 17:02
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