Performance tooling: profiling harness + render-equivalence suite - #2078
Merged
Conversation
4 tasks
jameshadfield
force-pushed
the
v3
branch
2 times, most recently
from
July 13, 2026 02:16
fb4fe78 to
4d9e17a
Compare
Instrument the incremental SVG-update path so the profiling harness can attribute
it: wrap modifySVG in a timer, and add the missing timerEnd("mapToScreen") (its
timerStart had no matching end, which tripped a race-condition warning and never
logged). Timer calls are stripped from normal builds; they are compiled in only
via `auspice build --includeTiming`.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A reusable, measure-only harness (test/profiling/, `npm run profile`) that builds a --includeTiming production bundle, serves the local data/ dir, drives Auspice headless against representative datasets, captures the perf.js console timers, and writes a ranked baseline (with before/after diffing via --baseline). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
renderEquivalence.mjs + domSnapshot.mjs assert that the incremental tree-update path (phylotree.change()) produces DOM identical to a from-scratch full render of the same state, for each operation and for sequences of operations. Driving needs no source changes: history.pushState + a popstate event triggers the app's own listener, which takes the incremental URL_QUERY_CHANGE branch — the same change() path a control click uses. The golden reference is a fresh page at the app's resulting URL. The comparator snapshots per-id tips/branches/conf (reading style+attr, normalizing units/precision) and reports per-element diffs. Covers colorBy (incl. genotype/continuous), all layouts, distance, date + trait filters, zoom, temporal confidence, and combinations, across ebola/zika/spike-sm. Run: `npm run render-equiv`. Supersedes the one-off verifyRenderEquivalence check. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Various updates to the performance tooling introduced by Opus 4.7 in the previous two commits. Dataset (name/URL) changes reflect the new data situation in Auspice v3.
jameshadfield
force-pushed
the
perf-infra
branch
from
August 23, 2026 23:32
b5674a7 to
e74631c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Via Claude
Summary
Tooling for the performance effort (no user-facing behavior change). The actual render optimizations land in a stacked follow-up PR (
perf-implement→ this branch), so the tooling can be reviewed separately from the behavioral changes.Three commits:
Profiling timer instrumentation — wraps
modifySVGin atimerStart/Endand adds a missingtimerEnd("mapToScreen")(itstimerStarthad no matching end, tripping a race warning and never logging). Timer calls are stripped from normal builds — compiled in only viaauspice build --includeTiming— so this is inert in production.Headless profiling harness (
npm run profile,test/profiling/) — builds a--includeTimingproduction bundle, serves the localdata/dir, drives Auspice headless against representative datasets, captures theperf.jsconsole timers, and writes a ranked baseline with before/after diffing (--baseline).Render-equivalence regression suite (
npm run render-equiv) — for each operation (colorBy, layout, distance, filter, zoom, confidence, …) and for sequences of operations, drives the incrementalphylotree.change()path (viahistory.pushState+ apopstateevent — the app's own listener, zero source changes) and asserts the settled SVG DOM is identical to a from-scratch full render of the same end state. A mismatch is a stale-DOM regression. Covers ebola/zika/spike-sm.Test plan
npm run render-equiv -- --build→ all scenarios green (blanket-flag behaviour is trivially equivalent on this branch).npm run profile -- --build→ produces a ranked baseline.tsc+eslintclean.🤖 Generated with Claude Code