Skip to content

Stop web GUI animations from running around the clock - #27

Merged
marcus-crane merged 1 commit into
masterfrom
perf/finite-pulse-animations
Aug 7, 2026
Merged

Stop web GUI animations from running around the clock#27
marcus-crane merged 1 commit into
masterfrom
perf/finite-pulse-animations

Conversation

@marcus-crane

Copy link
Copy Markdown
Member

Why

The operator UI costs 40–60% of a core on every x86 station, with gnome-shell adding ~16% compositing the frames (measured on s-221, s-121, s-321; identical whether a test is running or not). On the 2-core Celeron G3900 station PCs that is roughly a third of the machine.

The bulk of it is three infinite CSS animations, and all three happen to be active on the screen a station displays between DUTs:

Animation Where When it runs
htf-base-input-pulse barcode input :focus idle screen keeps the input focused, so 24/7
htf-progress-bar-pulse progress bar .is-complete stations sit on the finished-result screen, so 24/7
move (barber-pole stripes) progress bar fill whenever the bar has width, including parked at 100%

The two pulses animate box-shadow and the stripes animate background-position — none of which can run on the compositor, so every frame forces a content-process restyle plus a WebRender scene rebuild and re-render in the parent (~150 content main-thread wakeups/s observed on s-221).

What

CSS-only, no template/TS changes:

  • Input pulse: 5 cycles, then still. The app refocuses the input after each scan, which replays the animation, so the operator "scan here" cue survives per-DUT.
  • Completion pulse: 3 cycles, then still — and the stripes stop once the bar is complete. Between DUTs the page now settles to fully static, meaning zero rendering work.
  • Stripes scroll by transform instead of background-position (element extended by one 50px tile and translated). Visually the same barber-pole, but during a running test the per-frame work moves to the compositor.

dist/ rebuilt (bundle 784226fb) with node 16 + npm ci, same as the Thai-translation rebuild. Output formatting and bundle sizes match the previous build.

Expected impact

Estimated 35–45 points of a core back per station (roughly 20% of the whole machine), pending A/B. Baselines already recorded for validation: 40.5% (s-221, 15s window) and 17.4% aggregate (hq-1021). Plan is to bump the submodule in hardware-test-framework on a test/* branch, deploy to hq-1021, and compare before merging the bump.

Not included (deliberately): the GUI's 10Hz TimeService change-detection tick — a further ~10–15 points, candidate for a follow-up.

🤖 Generated with Claude Code

The operator UI burns 40-60% of a core on every x86 station (plus ~16%
of gnome-shell compositing), measured on s-221/s-121/s-321 and idle or
not. The bulk of it is three infinite CSS animations that all happen to
be active on the screen a station shows between DUTs:

- the barcode input's focus pulse (the idle screen keeps it focused)
- the progress bar's is-complete pulse (stations sit on the finished
  result screen)
- the progress bar's barber-pole stripes, which stay visible when the
  bar is parked at 100%

The two pulses animate box-shadow, which cannot run on the compositor,
so every frame forces a content-process restyle plus a full WebRender
rebuild in the parent (~150 main-thread wakeups/s observed).

Changes, all CSS-only:

- Input focus pulse runs 5 cycles then stops. Refocusing (which the app
  does after each scan) replays it, so the operator cue survives.
- Completion pulse runs 3 cycles then stops, and stripes stop once the
  bar is complete, so the between-DUTs screen is fully static.
- The stripes animation translates the element by one tile instead of
  animating background-position, moving the per-frame work to the
  compositor for the duration of a running test.

dist/ rebuilt (bundle 784226fb) with node 16 + npm ci, same as the
Thai-translation rebuild.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Marcus Crane <marcus@utf9k.net>
@marcus-crane
marcus-crane merged commit 7362d83 into master Aug 7, 2026
14 checks passed
@marcus-crane
marcus-crane deleted the perf/finite-pulse-animations branch August 7, 2026 08:39
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