Stop web GUI animations from running around the clock - #27
Merged
Conversation
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>
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.
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:
htf-base-input-pulse:focushtf-progress-bar-pulse.is-completemove(barber-pole stripes)The two pulses animate
box-shadowand the stripes animatebackground-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:
transforminstead ofbackground-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 (bundle784226fb) 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
TimeServicechange-detection tick — a further ~10–15 points, candidate for a follow-up.🤖 Generated with Claude Code