Optimize rendering and runtime weight without removing Visualizer features - #5
Optimize rendering and runtime weight without removing Visualizer features#5danielhjeffery wants to merge 11 commits into
Conversation
Preserve v1.12.8 UI, presets, and exact export behavior. Vectorize spline math, skip discarded preview meshes, bound allocations, keep sampled paths connected, honor controls, synchronize pause refinement, validate live buffers, skip disabled stage grabs, and complete wheel module declarations. Add 11 regression tests, reproducible CPU benchmark, four-platform CI, and a GPU/remaining-gap assessment. Linux local and hosted validation: 113 tests, 111 passed and 2 macOS-only skips. Hosted Ruff, compile and source checks passed. No GPU renderer or physical-hardware certification claimed. Remove temporary patch-transfer files and validation workflows from the final tree.
|
Final verification for head
Run: https://github.com/MetriqOrg/Metriq-Visualizer/actions/runs/34438871891 The local suite also completed: 113 tests, 111 passes and the same 2 macOS-only skips as the untouched Linux baseline. The measured CPU preview result remains 156.601 ms → 29.388 ms median for the documented controlled workload. This does not certify physical GPUs/audio devices or signed desktop installers, and no GPU renderer was enabled. PR remains unmerged; main is unchanged. |
Share a bounded full-resolution current-frame cache with stage output; repaint cursors rather than entire scientific plots with original foreground ordering; defer hidden analysis panels until viewed or used; load stage video decoding only when requested and release it on close. Preserve existing presets, controls, density, timing, data formats and exact export renderer. Add 12 regression tests, a reproducible lightweight-runtime benchmark, and detailed cache/measurement limits. Local full suite: 125 tests, 123 passed and 2 macOS-only skips. Focused suite also passes at 1.5x and 2x scale. Hosted OS checks apply to this final revision separately. Remove temporary source-preparation workflow from the final tree. No new dependency, GPU backend, version bump, or installer-size reduction.
Second-pass final verificationHead Run: https://github.com/MetriqOrg/Metriq-Visualizer/actions/runs/34489886120 The local full suite completed 125 tests: 123 passed, with the same two macOS-only skips as the Linux baseline. All 12 new focused tests passed locally at scale factors 1.0, 1.5 and 2.0. Pixel comparisons preserved full-render output across all five scientific panel modes. No existing test was removed or relaxed. The controlled second-pass measurements remain: new frame + three repeated captures 164.436 → 41.178 ms, spectrogram cursor 45.784 → 1.444 ms, mapped-trace cursor 39.585 → 10.639 ms. New-frame generation itself is essentially unchanged. Python-tracked retained plot-preparation allocations were 52,524,815 → 9,888,654 bytes, not a total RAM claim. No resolution, density or frame-rate defaults were lowered; no feature or dependency was removed. All eight second-pass published source blobs match the tested local hashes. The combined offline patch was applied to a clean original-source snapshot and all 14 resulting changed/added files matched the final source byte-for-byte. Temporary preparation workflow is absent from the final tree. Main remains |
Scope
Two incremental maintenance passes on existing v1.12.8, based on main
96fe31c7f112083f6aea652689b01411979f49c0. No rebuild, UI redesign, new styles, version bump, preset migration, project-schema change or dependency addition. Existing mappings, quality settings, formats and exact export renderer remain in place. Main is unchanged; this PR is not auto-merged.Current second-pass head:
bac4446aa6ffd33cedcbaedf17211f30ade63fec.First pass — rendering work and correctness
The first-pass controlled raster benchmark measured 156.601 → 29.388 ms per frame. That result and its workload are recorded in
docs/RENDERING_OPTIMIZATION.md; it is not a general app multiplier.Second pass — lightweight without feature loss
tools/benchmark_lightweight.py. No quality or FPS defaults reduced.Second-pass measurements against first-pass source
Sequential separate processes, same Linux offscreen host and libraries; 100,000 source rows, 1,200 live points, smooth detail 4, 960×600 viewport, DPR 1, 20 samples after three warmups.
Initial Source-tab plot preparation retained 52,524,815 → 9,888,654 Python-tracked bytes. This is not total application RAM/RSS: fixtures were allocated before tracing, native Qt memory is not fully tracked, and caches add bounded native memory. New-frame cost is essentially unchanged; gains come from avoiding repeated work. No GPU/FPS guarantee or executable-size reduction is claimed. Details:
docs/LIGHTWEIGHT_RUNTIME_PASS.md.Validation
Explicit boundaries
No GPU renderer enabled. Hardware encoding is not GPU scene rendering. Live labels/colorbar/ghost-path parity and moving-viewport DPI cap remain documented work, not removed controls or completed claims. No physical GPU/audio-device or signed-installer certification.
Review Files changed and the current checks. Squash merge is recommended to collapse temporary preparation history; this PR remains unmerged.