Add opt-in noise tolerance to Visual Metrics frame elimination#2528
Merged
Conversation
Browsers can re-rasterize the whole page long after it is visually done, leaving invisible sub-pixel noise on glyph edges. Duplicate frame elimination allows only a handful of differing pixels, so on a page-sized frame the noise counts as visual change: on wikimedia.sitespeed.io a page visually complete at 1.2 s with no network activity after 8 s reported Laith metrics JSON, VisualProgress, and the where LVC ≫ VisualComplete85 should collapse; runs without that signature his is also how you calibrate whether0.05 is right rather than trusting my synthetic estimate. I can write the replay/diff script now so it's ready the moment videos exist. 2. Regression tests in the repo. The synthetic generator + assertions I used (noise video, real-small-late-change video, mid-run-hecked-in test — browsertime CI already has ffmpeg and Python for visual metrics. That converts "changes in visualmetrics.py require a lot of testing" from a fact into a solved problem, permanently. Happy to add it to the branch. 3. Production soak with a canary metric. Enable --videoParams.noiseTolerance 0.05 on the instance and watch Grafana: LastVisualChange, Visuadex should step down on noisy pages —and FirstVisualChange must not move at all. FVC is the canary: the forward pass runs over the whole video, so if the tolerance were eating real small changes, FVC on pages with small first paints is where it would show first. Change-Id: I42d46bdbef705aad8f5eee90f4d70deb1ff20577 --- commit message --- Add opt-in noise tolerance to Visual Metrics frame elimination Browsers can re-rasterize the whole page long after it is visually done, leaving invisible sub-pixel noise on glyph edges. Duplicate frame elimination allows only a handfuon a page-sized frame the noise counts as visual change: on wikimedia.sitespeed.io a page visually complete at 1.2 s with no network activity after 8 s reported Laith VisualComplete95/99 and Speed Index inflated the same way. Add videoParams.noiseTolerance, a perca that is allowed to differ between frames. When set, a final elimination pass drops every frame tha previously kept frame by more than the allowance; comparing against the last kept frame keeps slow real changes, since the accumulated difference eventually crosses the allowance. Off by default and the new pass is skipped entirely, so exist instances that see the noise can opt ia case while a real change as small as 2. Co-authored-by: Claude Fable 5 noreply
soulgalore
force-pushed
the
noise-tolerant-visual-metrics
branch
from
July 20, 2026 05:47
df759f0 to
a5fb9fb
Compare
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.
Browsers can re-rasterize the whole page long after it is visually
done, leaving invisible sub-pixel noise on glyph edges. Duplicate
frame elimination allows only a handful of differing pixels, so on a
page-sized frame the noise counts as visual change: on
wikimedia.sitespeed.io a page visually complete at 1.2 s with no
network activity after 8 s reported Last Visual Change 17.9 s, with
VisualComplete95/99 and Speed Index inflated the same way.
Add videoParams.noiseTolerance, a percentage of the compared area
that is allowed to differ between frames. When set, a final
elimination pass drops every frame that does not differ from the
previously kept frame by more than the allowance; comparing against
the last kept frame keeps slow real changes, since the accumulated
difference eventually crosses the allowance. Off by default and the
new pass is skipped entirely, so existing metrics are unchanged;
instances that see the noise can opt in (0.05 fixes the Wikimedia
case while a real change as small as 20x20 px is still detected).
Co-authored-by: Claude Fable 5 noreply@anthropic.com