Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

WebKit 8 min read Deep dive mediumAdept

MotionMark: A New Graphics Benchmark

MotionMark is a browser graphics benchmark that measures how complex a scene can get before the frame rate falls below 60 fps, instead of measuring frame rate on a fixed scene. It uses requestAnimationFrame to avoid throttled offscreen frames and scales the stage to the device's screen size. A controller first raises complexity exponentially to find an upper bound, then runs repeated ramps across the change point. It fits a piecewise least-squares regression to estimate that point, with bootstrapped confidence intervals. Its narrowly focused tests helped WebKit find costly graphics-context save/restore calls and an iOS CADisplayLink timing bug that halved animation speed.

Assumes: requestAnimationFramebrowser rendering basicsCanvas, SVG and CSS animations

Related posts

  • Announcing MotionMark 1.3

    WebKit mediumAdept

    MotionMark 1.3, Apple's browser graphics benchmark, now detects the browser's requestAnimationFrame frequency and uses it as the target frame rate instead of assuming 60fps. Browsers running at 120Hz therefore get less time per frame and score lower, so cross-browser comparisons should be run with the display set to 60Hz. Scoring drops the unreliable "flat" profile and counts only animation frames, excluding the slower DOM-mutation frames that added noise. Several subtests were also fixed: Multiply's complexity cap was raised and its hiding method changed, Paths got a more consistent workload, and Design no longer clips text in a way that inflated scores.

  • MotionMark 1.2

    WebKit mediumAdept

    MotionMark 1.2 is a small reliability-focused update to the browser graphics benchmark. Its largest change is removing the Focus subtest. In engines with an asynchronous compositor like WebKit, that subtest measured how fast work descriptions reach the compositor rather than how fast the compositor executes them, and its indirect, scheduler-mediated backpressure caused large score variance. The harness also adds longer warm-up between tests, requires at least 30 frames between tests and 9 frames before any complexity-ramping decision, and discards outlier frame times, making scores far more reproducible across machines.

  • Speedometer 3.0: The Best Way Yet to Measure Browser Performance

    WebKit mediumAdept

    Speedometer 3.0, jointly governed by Blink, Gecko and WebKit developers, changes how browser responsiveness is measured. Test scripts now run inside a requestAnimationFrame callback as "sync" time, and a zero-delay timer scheduled from a second rAF measures "async" time. Under the HTML5 event loop model, this ordering guarantees that rendering updates and rAF-deferred framework work are captured, which the old timer-only approach could miss. The workloads expand to TodoMVC apps in nine popular frameworks chosen from HTTP Archive and npm data, complex-DOM variants, Next.js/Nuxt news sites, SVG and canvas charting apps, and CodeMirror/TipTap editors. Scores are rescaled so a typical browser starts in the 20–30 range.

  • Speedometer 2.1

    WebKit mediumAdept

    Speedometer 2.1 is a minor update that fixes the benchmark harness so it no longer measures artificial timer throttling. The harness used nested setTimeout calls to capture deferred asynchronous work, but the deep nesting it built up triggered the spec-mandated 4ms throttle between callbacks, inflating measured work time. Inserting window.requestAnimationFrame before each test run resets the nesting level and isolates subtests better. Scores improved 3-5% in stable Safari, Chrome and Firefox.

  • Measuring the back/forward cache with Application Metrics

    Sentry mediumAdept

    Sentry's new opt-in bfcacheMetricsIntegration (JavaScript SDK v11) turns the browser's back/forward cache decisions into application metrics, closing a blind spot where cache hits leave no page-load telemetry. Built on the pageshow event and the notRestoredReasons API, it emits three metrics: a hit/miss counter per back/forward navigation, a Chromium-only counter of not-restored reasons with the frame that caused them (e.g. unload listeners, websockets, Cache-Control: no-store), and a distribution of fallback reload duration that measures what each miss cost the user. Because eligibility can regress without code changes, the recommendation is to track hit rate continuously and break misses down by route, release and browser.

The quest for software engineering knowledge.

Look:
Layout: