Repository navigation
Conversation
flamboh
added this pull request to stack #132
October 6, 2026 10:39
This was referenced Oct 6, 2026
Mount through TanStack DOM in a Svelte attachment. Remove client prerender and a separate reactive resize pass. Keep responsive definitions, focus options, teardown and the positioned-observation contract. An owned interaction snapshot prevents lazy callback-only derived chains from retaining detached charts; repeated-filter GC stress verifies teardown. Fixed-settings checkpoint versus QA-fixed layer 3: all charts 4280.4 -> 3163.2 ms, retained dashboard heap 30.1 -> 22.9 MiB; file readiness 654.3 -> 487.1 ms. The mount bundle inventory reused a directory and is invalid; later fresh exports and the final build validate bundle savings. Three browser samples per page. Checkpoint measurements above predate the final QA lifecycle/coverage fixes and are not isolated shipping effects. Combined shipping benchmark: 477.2/2934.3 ms default visible/all charts, 114 ms observed initial TBT, 18.2 MiB retained heap and 191.1 KiB gzip JS. Original baseline: 509.1/3258.9 ms, 130 ms, 18.3 MiB, 228.1 KiB. Layer 3: 569.3/4271.3 ms, 159 ms, 29.9 MiB, 202.4 KiB. Baseline dates, five API runs, three fresh contexts per page and one warmup; no concurrent QA/build/dev work. Shipping artifacts: /tmp/atlantis-frontend-overhaul/perf/layer4-shipping/results.json. Full gates pass with 220 web and 70 e2e tests.
Generate the active focus guide instead of retaining a hidden SVG circle for every observation. Preserve primary point radius, fill and stroke. Hover does not reconstruct the scene. Exploratory checkpoint after mount: dashboard heap 22.9 -> 21.1 MiB and initial observed TBT 153 -> 107 ms. This checkpoint preceded the corrected primary-focus resolver, so it is diagnostic rather than final interaction evidence. The corrected guide passed full e2e and final real-stage QA. Final series count/value/hover contracts are unchanged. Checkpoint measurements above predate the final QA lifecycle/coverage fixes and are not isolated shipping effects. Combined shipping benchmark: 477.2/2934.3 ms default visible/all charts, 114 ms observed initial TBT, 18.2 MiB retained heap and 191.1 KiB gzip JS. Original baseline: 509.1/3258.9 ms, 130 ms, 18.3 MiB, 228.1 KiB. Layer 3: 569.3/4271.3 ms, 159 ms, 29.9 MiB, 202.4 KiB. Baseline dates, five API runs, three fresh contexts per page and one warmup; no concurrent QA/build/dev work. Shipping artifacts: /tmp/atlantis-frontend-overhaul/perf/layer4-shipping/results.json. Full gates pass with 220 web and 70 e2e tests.
Retain every finite observation, datum, color, position and bucket identity in the TanStack scene. Above 2048 points, paint dots directly at device pixel ratio inside the SVG mark group. Keep axes and focus SVG and sparse plots native SVG. Paint the full surface to preserve endpoint circles. Controlled renderer microbenchmark, 9870 marks: native SVG render 145 -> 29 ms, presentation 229 -> 87.5 ms, DOM 9906 -> 38 nodes. Default dashboard checkpoint: all charts 3133.7 -> 2817.0 ms and heap 21.1 -> 19.0 MiB. Some exploratory checkpoint validation overlapped; the uncontended final benchmark is the shipping comparison. No sampling or aggregation. Checkpoint measurements above predate the final QA lifecycle/coverage fixes and are not isolated shipping effects. Combined shipping benchmark: 477.2/2934.3 ms default visible/all charts, 114 ms observed initial TBT, 18.2 MiB retained heap and 191.1 KiB gzip JS. Original baseline: 509.1/3258.9 ms, 130 ms, 18.3 MiB, 228.1 KiB. Layer 3: 569.3/4271.3 ms, 159 ms, 29.9 MiB, 202.4 KiB. Baseline dates, five API runs, three fresh contexts per page and one warmup; no concurrent QA/build/dev work. Shipping artifacts: /tmp/atlantis-frontend-overhaul/perf/layer4-shipping/results.json. Full gates pass with 220 web and 70 e2e tests.
Format bucket labels once per bucket, cache repeated x-axis layout formatting within a definition, scan alpha bounds only for spectrum charts, and measure legend bounds once per publication. Checkpoint after dense renderer: file readiness 448.8 -> 429.8 ms and heap 19.0 -> 18.8 MiB. Dashboard all-chart timing varied 2817.0 -> 2860.7 ms, so this checkpoint does not establish a dashboard latency improvement. Exact labels and series values are preserved. Checkpoint measurements above predate the final QA lifecycle/coverage fixes and are not isolated shipping effects. Combined shipping benchmark: 477.2/2934.3 ms default visible/all charts, 114 ms observed initial TBT, 18.2 MiB retained heap and 191.1 KiB gzip JS. Original baseline: 509.1/3258.9 ms, 130 ms, 18.3 MiB, 228.1 KiB. Layer 3: 569.3/4271.3 ms, 159 ms, 29.9 MiB, 202.4 KiB. Baseline dates, five API runs, three fresh contexts per page and one warmup; no concurrent QA/build/dev work. Shipping artifacts: /tmp/atlantis-frontend-overhaul/perf/layer4-shipping/results.json. Full gates pass with 220 web and 70 e2e tests.
Batch same-state lane rectangles only during SVG serialization. Retain native scene rectangle hit geometry, every original interval, ratio and interaction point; keep partial dash segments and transparent unknown observations. QA caught wide-interval hover loss when batching scene nodes; serialization-only batching fixes it and has near-boundary/interior regressions. Checkpoint after label reuse: default all charts 2860.7 -> 2817.0 ms and heap 18.8 -> 18.7 MiB. Remove roughly 1185 SVG DOM coverage rectangles on the real default dashboard, retaining scene rectangles for hit testing. Unit and browser checks retain interval and coverage semantics; checkpoint timing has three-sample limits. Checkpoint measurements above predate the final QA lifecycle/coverage fixes and are not isolated shipping effects. Combined shipping benchmark: 477.2/2934.3 ms default visible/all charts, 114 ms observed initial TBT, 18.2 MiB retained heap and 191.1 KiB gzip JS. Original baseline: 509.1/3258.9 ms, 130 ms, 18.3 MiB, 228.1 KiB. Layer 3: 569.3/4271.3 ms, 159 ms, 29.9 MiB, 202.4 KiB. Baseline dates, five API runs, three fresh contexts per page and one warmup; no concurrent QA/build/dev work. Shipping artifacts: /tmp/atlantis-frontend-overhaul/perf/layer4-shipping/results.json. Full gates pass with 220 web and 70 e2e tests.
Use the tree-shakable functional Mini API for URL and dataset schemas. Preserve parsing, date validation, fallbacks and serialization, including leap-year boundary cases. Fresh production export: total gzip JavaScript 201.3 -> 191.1 KiB, saving 10.2 KiB. Default heap 18.7 -> 18.5 MiB; all-chart timing varied 2817.0 -> 2845.6 ms. No validation policy changes. Checkpoint measurements above predate the final QA lifecycle/coverage fixes and are not isolated shipping effects. Combined shipping benchmark: 477.2/2934.3 ms default visible/all charts, 114 ms observed initial TBT, 18.2 MiB retained heap and 191.1 KiB gzip JS. Original baseline: 509.1/3258.9 ms, 130 ms, 18.3 MiB, 228.1 KiB. Layer 3: 569.3/4271.3 ms, 159 ms, 29.9 MiB, 202.4 KiB. Baseline dates, five API runs, three fresh contexts per page and one warmup; no concurrent QA/build/dev work. Shipping artifacts: /tmp/atlantis-frontend-overhaul/perf/layer4-shipping/results.json. Full gates pass with 220 web and 70 e2e tests.
Add optional addressSide=source|destination response projection. Omission retains the full API. Keep both sides in row membership, grouping, MAX(bucket_end) and coverage queries. Decode only the requested blob and return the other array empty. Scope dashboard request/cancellation/window-cache keys to the side. After Mini checkpoint: default visible/all charts 478.9/2845.6 -> 455.9/2805.9 ms, TBT 104 -> 98 ms, heap 18.5 -> 18.1 MiB. Real default selected-source decoded payload 860.8 -> 414.6 KiB, saving 51.8%. SQLite and D1 tests compare projection with full responses, including unequal sides and an opposite-side-only bucket. Stored schema, additive rollups, half-open windows and zero-fill are unchanged. Checkpoint measurements above predate the final QA lifecycle/coverage fixes and are not isolated shipping effects. Combined shipping benchmark: 477.2/2934.3 ms default visible/all charts, 114 ms observed initial TBT, 18.2 MiB retained heap and 191.1 KiB gzip JS. Original baseline: 509.1/3258.9 ms, 130 ms, 18.3 MiB, 228.1 KiB. Layer 3: 569.3/4271.3 ms, 159 ms, 29.9 MiB, 202.4 KiB. Baseline dates, five API runs, three fresh contexts per page and one warmup; no concurrent QA/build/dev work. Shipping artifacts: /tmp/atlantis-frontend-overhaul/perf/layer4-shipping/results.json. Full gates pass with 220 web and 70 e2e tests.
Use afterNavigate for initial loads and URL/history changes. Remove the duplicate onMount fetch. Regression checks require one details request for initial load, next, back and reload, alongside existing retry coverage. Update chart architecture and e2e contract documentation. Shipping build after lifecycle/coverage fixes versus projection checkpoint: file readiness 429.8 -> 418.3 ms, TBT 129 -> 125 ms; one initial details request instead of two. Shipping default visible/all readiness 477.2/2934.3 ms, TBT 114 ms, heap 18.2 MiB, total gzip JS 191.1 KiB. Original baseline 509.1/3258.9 ms, 130 ms, 18.3 MiB and 228.1 KiB. Three fresh browser samples; no overlapping validation. Checkpoint measurements above predate the final QA lifecycle/coverage fixes and are not isolated shipping effects. Combined shipping benchmark: 477.2/2934.3 ms default visible/all charts, 114 ms observed initial TBT, 18.2 MiB retained heap and 191.1 KiB gzip JS. Original baseline: 509.1/3258.9 ms, 130 ms, 18.3 MiB, 228.1 KiB. Layer 3: 569.3/4271.3 ms, 159 ms, 29.9 MiB, 202.4 KiB. Baseline dates, five API runs, three fresh contexts per page and one warmup; no concurrent QA/build/dev work. Shipping artifacts: /tmp/atlantis-frontend-overhaul/perf/layer4-shipping/results.json. Full gates pass with 220 web and 70 e2e tests.
Belongs-in: #133 perf/optimize The direct DOM host lost the Svelte adapter automatic ID prefix. Shared SVG clip IDs made spectrum, coverage and file charts resolve another plot clipping rectangle. Restore per-instance Svelte IDs while retaining the DOM host and dense canvas. Verify local clip resolution across dashboard plots, theme changes and file analyses.
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.
Note
🤖 GPT-6.1-Sol on behalf of Oliver
Round 3 review fixes
Restore a stable Svelte-generated ID prefix for every direct DOM chart host. Without it, duplicate SVG clip IDs made spectra and file plots resolve another chart's clip rectangle, removing high-alpha bands. The fix keeps the dense canvas and direct host. Regression coverage checks document resolution and uniqueness across dashboard charts, theme changes and file analyses. Restacking retains the calendar/stroke/legend fixes from #131.
Own-tip verification: format, lint, typecheck, production build, 235 web tests and 74 Playwright tests passed. Human review: inspect full upper spectrum bands, coverage, theme repaint and file plots. The public before/after clipping sheet uses illustrative fixture observations; real v5 sheets remain local. The final combined-stack performance comparison is recorded in #135; this layer's earlier shipping measurements remain historical checkpoints.
The TanStack migration increased dashboard render time and retained heap. This layer mounts charts directly, reduces chart DOM and formatting work, trims client validation code, requests only the displayed spectrum side, and removes duplicate file-detail loads. Default all-chart readiness falls from 4271.3 to 2934.3 ms and retained heap from 29.9 to 18.2 MiB against layer 3. Every plotted observation remains available for interaction and accessibility summaries.
Layer 4, based on
feat/tanstack-chartsin #131, following #130 and #129. Eight optimization commits, each with its measured effect and a passing production build. Nothing merged.Shipping performance
Fresh production export and benchmark after the lifecycle and coverage-hover fixes. Same read-only v5 dataset, June 1 2025 through October 6 2026, five measured API runs with one discarded warmup, three fresh Chromium contexts per page, 1280×800 viewport, no throttling, one-second settling and explicit GC. All 35 API cases and 18 browser loads passed with zero errors. No QA, build or development work overlapped the measurement. Pre-existing development processes were paused for the run and then resumed.
Readiness uses
[data-chart-rendered="true"]. All-chart timing includes scrolling, settling and GC. Observed TBT is the harness observation-window metric, not Lighthouse. Three page samples limit timing claims; the retained-heap gain over the original baseline is only 0.8%. FCP/LCP matches the original but is slower than layer 3. The full-spectrum and structure API medians are also slower; this PR does not establish a general query-latency improvement. Their full all-router payloads remain 2969.7 and 4882.4 KiB.Separately, independent QA measured the default selected-source spectrum response at 860.8 KiB with both sides versus 414.6 KiB with source projection, a 51.8% reduction. Destination projection is 521.4 KiB. These selected-source figures describe the dashboard request, not the benchmark's full all-router API request.
Optimizations ranked by impact
The ranking reflects the recorded render, memory and payload effects. Checkpoint timings precede the final QA fixes, include three-sample noise, and are not additive isolated shipping effects.
afterNavigatefor initial, URL and history loads. Initial, next, back, reload and retry each issue one details request. Shipping file readiness is 418.3 ms versus the projection checkpoint's 429.8 ms; observed TBT is 125 versus 129 ms. The larger file gains in the table also include renderer changes.Semantic and API decisions needing review
addressSide=source|destinationis opt-in. Omission preserves the full API. Projection returns the requested spectrum unchanged and the other array empty. Both-side SQL membership, maximum bucket end, coverage, null/empty buckets and half-open windows remain intact. SQLite and D1 tests include unequal sides and an opposite-side-only bucket. Storage and rollups do not change.Verification and human review guide
Automated verification passed:
bun run format,bun run lint,bun run typecheck,bun run test:webwith 220 tests, andbun run test:e2ewith 70 tests. New regressions cover wide-interval pointer hover and retained DOM/listeners across six explicit-GC filter transitions. Every final optimization commit was production-built during autosquash. The final tree matches the clean shipping-measurement tree.Independent Chromium QA covered all eight dashboard cards and 12 file charts, both themes, 390/768/1280/1920px layouts, all controls, hover/keyboard/legends, brushes/drilldown/mirroring, URL/history, empty/unknown bounds, failures/retries and cancellation. Numerical checks matched 40 series and 14 tooltip/stacking assertions to API values. Canvas auditing matched all 6652 real observations, positions, colors, radii and paint order at DPR 1/2 and every tested width; the independently reconstructed raster matched exactly.
QA found two S2 regressions, both fixed and independently rechecked: wide-interval hover and detached chart retention. The fixed 30-transition stress kept 251 listeners and bounded DOM counts, with later heap samples around 19 MB rather than the former roughly 4.5 MiB growth per cycle. Home teardown left zero chart hosts. Later fixed coverage, lifecycle, side-cancellation, retry and layout/error-recovery reports have zero errors. The older pending-status report is superseded by those fixed artifacts.
For human review:
Inherited selection persistence, narrow file text, lookup/date feedback, file titles and keyboard layout gestures remain for later layers. #104 tracks the separate DST evidence issue.
Only perf :8090 was redeployed. The production test container on :8080 is unchanged, the source database metadata is unchanged and the perf bind mount remains read-only. No Cloudflare operations occurred. Private screenshots, API captures and heap snapshots remain local. Shipping artifacts and comparison are under
/tmp/atlantis-frontend-overhaul/perf/layer4-shipping/.Changes made by GPT-6.1-Sol through the Codex harness in T3 Code.