Skip to content

P0 GUI Stutter A–D: single native CSSOM, cascade pruning, pointer hot-path + profiling - #414

Merged
masarray merged 64 commits into
mainfrom
perf/p0-stage-a-approved-gui-profiling-20261105
Nov 5, 2026
Merged

masarray merged 64 commits into
mainfrom
perf/p0-stage-a-approved-gui-profiling-20261105

Conversation

@masarray

@masarray masarray commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

P0 Stage A — exact approved /preview/ mouse-latency evidence

Closes no performance issue until affected-PC Windows proof exists. References #56. This PR introduces opt-in instrumentation + CSS anti-stacking gates, not a measured pointer speedup.

Product changes

  • Reusable opt-in ArSonMixPerf probe on the ONLY published /preview/ GUI and its exact JUCE WebView2 native bundle. Disabled in normal use: no continuous probe animation, sampling loop, CSS override, panel, overlay or artificial audio. Start/stop: Ctrl+Alt+Shift+F9 (15 s auto-stop). Browser URL-only optional ?armixperf=1 and JS export API.
  • Measures browser rAF frame spacing grouped by pointer region, handled-pointer-to-rAF proxy, available long tasks and accepted snapshot processing. No claims about GPU paint or actual input-to-photon.
  • One gated JUCE message-thread recording mode samples timer work/gaps, existing status and snapshot emission costs, duplicate 1 Hz snapshot count, without inserting ANY new work into the realtime PCM callback. Records separate GUI_PERF_JS and GUI_PERF_NATIVE to existing async diagnostic log; none written by probe while off.
  • Opt-in bounded PowerShell scripts/collect_gui_perf_windows.ps1 records local CPU/memory timeline for native host and WebView2. No personal system data upload or autorun.
  • Existing approved CSS remains unchanged. Built a strict no-new-cross-owner selector+property gate with 114 known inherited conflicts locked for explicit reduction, 18 approved CSS links locked (including PNG controls from actual button owner), and forbids new inline style override blocks. No new stacked CSS.
  • Chromium approved compiled Pages probe smoke, CSS negative tests and CI qualification; preserve exact native Pages/PNG resource parity, 1366x768, M3 accepted ACK/readback and VST3/WIRE controls.

Verification and status

Guardrails

One audio callback; no new CSS overlays; original /preview/ appearance+PNG controls; no fake PCM, no default audio output changes, no automatic arming/routing, preserve ACK+later authoritative readback, real VST3 and WIRE interactions.

Stage B — runtime hot path and CSS architecture (2026-11-05)

  • Native message thread: remove extra 1Hz engine status acquisition and duplicated full snapshot event; keep all 1Hz audio health evidence and continuous 12Hz real PCM metering/ACK/readback.
  • Native approved GUI: per-strip DOM meter-node cache with detach/structural-install invalidation; skip identical hardware menu/status writes. WeakMap meter paint dirty-checks --lit/peak extent/opacity without changing portrait LED/peak-hold output; WIRE hover rect memoized for 120ms and invalidated by scroll/resize.
  • The exact user-approved public /preview/ sources and all 18 authored CSS files remain byte-identical: no new override. Source-migration V28 history not rewritten; native-only diff is reversible via public_from_native.
  • Technical debt explicitly remains: 114 inherited cross-CSS-owner declaration overlaps plus 252 intra-file repeats, now prevented from increasing by CI (but not claimed already eliminated). Safe CSS consolidation needs source-owned computed-style parity evidence, not emergency overrides.
  • New native assembled Chromium functional meter+WIRE dirty-write regression and extra native safety/status contract test; actual owner Windows pointer/GPU and physical audio FAT still PENDING.
  • Stage B engineering handoff.

Stage C — deployed CSS cascade consolidation + visual proof (2026-11-05)

  • The ONE deterministic build assembler removes 242 proven redundant declarations (89 cross-file) from the deployed 18 CSS owner assets. No new CSS layer, alternative preview, or skin, and no modifications to accepted PNG-button/WIRE CSS source bytes. Content-addressed URLs prevent stale style cache; native Windows bundles exactly the Pages output.
  • Historical V28 source remains byte-exact; outstanding CSS source debt is explicitly NOT fully eliminated. 114 cross-owner + 252 same-owner static baseline repeats cannot all be removed safely without verified per-asset cascade/migration; gate prevents future increases.
  • New real Chromium compiled vs original computed-style/geometry regression in 1366×768, 1680×900, 1920×1080, hover + MUTE states, plus preexisting screenshot comparison and native Windows/CTest requirements. File URL base directories alone are canonicalized in tests; colors, image file identity, dimensions and transformations still compared strictly.
  • Stage C engineering record.
  • P0 mouse cursor stutter fix, GPU trace and physical ASIO/WASAPI hardware FAT remain unproven until affected-PC measurement. Do not merge when the exact PR SHA qualification is not green.

Stage D — exactly ONE loaded approved CSS (2026-11-05)

  • One deterministic assembler emits a single arsonmix-approved-runtime.css?sha=<digest> for both Pages /preview/ and the byte-identical native JUCE WebView2 resources, replacing 18 network/CSSOM stylesheet links with 1 (17 fewer CSS requests). The underlying 18 authored source owners and approved PNG/WIRE assets remain unchanged; no new override module or design/geometry change.
  • Conservative Stage C pruner currently removes 215 redundant declarations, 76 cross-owner, after retaining old WebView2 compatibility fallbacks; figures refer to a measured CI build and must be rechecked at exact head.
  • A source/manifest hash gate proves one runtime sheet, ordered provenance, original button assets and byte-for-byte public/native HTML recovery. Browser tests compare original 18 source styles against one compiled sheet via computed geometry and screenshot hashes at 1366×768, 1600/1680×900 and 1920×1080, and check actual CSS resource requests, PNG key, MUTE behavior.
  • Real Windows input-to-photon, GPU compositor and audio hardware FAT still PENDING; no claim of physical mouse stutter fixed. Historical authored CSS still has known duplicate declarations that need separate source migration, even though only ONE runtime CSS link exists.
  • Stage D technical design and acceptance.

Stage D — one loaded CSSOM and final integration

  • 18 source CSS owners → 1 deployed CSSOM (assets/arsonmix-approved-runtime.css) with content-addressed SHA, preserving declared source/cascade order, original PNG MUTE/SOLO/PFL, WIRE and WebView2-compatible fallbacks. Exactly 17 fewer stylesheet requests in the browser; 18 owner modules retained in repo as reviewable source, zero new override sheet.
  • tests/approved_css_stage_d_single_bundle_smoke.py checks actual Chrome CSS network count/PNG button/MUTE at 1366×768, 1680×900, 1920×1080. tests/single_preview_publication_contract_test.py verifies runtime bundle SHA, original per-owner compiled hashes, one approved GUI. Stage C screenshot and computed-style parity compare reconstructed original CSS against the sole shipped runtime CSS. Native Resources + Windows CTest remain mandatory.
  • Corrected P2 review issue in scripts/collect_gui_perf_windows.ps1: process sampler recognizes real AR MIX Studio and packaged EXE names, plus -ExePath; explicit warning if the JUCE process is absent. Review thread answered.
  • Stage D engineering report. Source CSS inherited repeats are not declared eliminated; the runtime build de-duplicates safe declarations, while fail-closed CI prevents new source stacking.
  • Physical Windows mouse stutter fix, GPU input-to-photon and audio hardware FAT remain PENDING until tested. Preserve P0: Cross-browser pointer stutter on standard Windows GPU (WebView2 + web mixer) #56 as open; do not mark physical improvement without trace evidence.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T04:53:55.802810Z 5b7b2c0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b7b2c073c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/collect_gui_perf_windows.ps1 Resolved

masarray commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Stage C — production CSS consolidation (2026-11-05, head c63c029c794903807e21ab518961ac35eff00d48)

Implemented in the existing single-owner PR #414, retaining all previous Stage A/B native hot-path changes. The canonical Pages assembler now compiles the actual 18 original CSS owner assets for both the ONE public /preview/ and JUCE WebView2, using safe exact-selector/property/priority/conditional-context winner selection. It removes source-order shadowed declarations from generated runtime assets only, with content-addressed CSS URLs. No new stylesheet, extra JavaScript on pointermove, changed PNG hardware CSS, changed WIRE CSS, second GUI, or audio-callback modification.

Measured compile output at exact revision: 242 redundant declarations removed, 89 of these across CSS files, 0 new override stylesheets (source CSS historical debt remains unchanged and visible). No claim that semantically distinct selectors or all conditional CSS should be mechanically merged.

Regression evidence: full Chromium UI suite PASS, including actual baseline-versus-compiled CSS computed-style and screenshot SHA parity at 1366×768 (default, channel identity hover, hardware button hover; 1,439 elements) and 1600×900 (1,743 elements). Compiler priority/at-rule/PNG/WIRE contract, byte-exact V28 source recovery and official GUI Pages/native assembly checks PASS. Windows native build/CTest is running at this checkpoint.

Stage C engineering documentation. Hardware WebView2 pointer stutter, GPU compositor p95/p99 and physical audio FAT remain unverified; #56 stays open until the affected PC is measured.

@masarray masarray changed the title P0 GUI Stutter Stages A+B: native hot-path cleanup + opt-in profiling + CSS no-new-stacking gate P0 GUI Stutter Stages A–C: native hot-path cleanup, CSS cascade pruning and visual parity Nov 5, 2026

masarray commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Stage C exact-head browser qualification — fallback-safe results

Exact PR SHA: 4875226dc48f4601fd715faa171b1be55dc238cd.

The first compiler pass removed 242 CSS declarations; a deliberate compatibility fix now preserves older var()/color-mix()/vendor fallbacks. Final CI build manifest/log: 215 declarations removed, 76 cross-file, 18 original owner stylesheets, zero added CSS override sheets. This supersedes the earlier 242/89 figure.

  • Full Standalone UI and geometry: PASS.
  • Approved original-vs-compiled computed style & geometry: PASS at 1366×768, 1680×900 and 1920×1080, four states per viewport.
  • Existing screenshot/hover parity, historical CSS V28, PNG hardware keys, WIRE/fader/FX, Stage A/B tests: PASS.
  • Windows JUCE/CTest job is still running at this checkpoint.
  • Source CSS still includes inherited historical repeats; original sources deliberately byte-locked. No claim of zero authoring debt or physical pointer stutter solution; keep Issue P0: Cross-browser pointer stutter on standard Windows GPU (WebView2 + web mixer) #56 open.

CI: https://github.com/masarray/arsonmix/actions/runs/41983865160

@masarray masarray changed the title P0 GUI Stutter Stages A–C: native hot-path cleanup, CSS cascade pruning and visual parity P0 GUI Stutter Stages A–D: native render optimization + one source-ordered runtime CSSOM Nov 5, 2026
@masarray masarray changed the title P0 GUI Stutter Stages A–D: native render optimization + one source-ordered runtime CSSOM P0 GUI Stutter A–D: single native CSSOM, cascade pruning, pointer hot-path + profiling Nov 5, 2026
@masarray
masarray merged commit 1a5ffa9 into main Nov 5, 2026
4 checks passed
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