Input latency and hit-testing

I wanted to know how much Interaction to Next Paint (INP) delay HTML-in-canvas adds when you tap, drag or type into moving controls, and what calling updateElementGeometry() plus the attribute-toggle workaround costs per frame across 1 to 200 elements. Tap or drag the moving buttons, type in the moving text box, and run the sweep below to measure overhead and hit-test drift on your browser.

Mode
Controls

Starting arena…

INP (p75 / p98 / worst)
-
0 interactions recorded
Median phase split
-
input / processing / presentation
Hit accuracy
-
Tap moving controls to measure
Last tap result
-
Waiting for input
Mode Events INP p75 INP p98 Worst Input Proc Pres Hit accuracy Stale misses
Tap buttons, drag them or type in the moving input above to record real Event Timing entries.
Recent recorded interactions (last 10)
Event Mode Controls Target Input Proc Pres Total
None recorded yet.
Show the code arena drawing, geometry updates, Event Timing and sweep
  1. 2D canvas mode. Draws each control with explicit width and height on drawElementImage().
  2. WebGL mode with and without cache busting. One ElementGL context draws quads, calls updateElementGeometry(), and toggles data-hit in the cache-bust mode.
  3. Real-interaction INP recorder. Watches PerformanceObserver({ type: 'event', durationThreshold: 0 }) and splits input delay, processing and presentation delay.
  4. Automated 1 to 200 control sweep. Measures per-frame JS cost, Long Animation Frames and elementsFromPoint() hit accuracy across each route.

Geometry overhead and hit-test drift sweep

The live arena measures real taps and typing. This sweep runs 24 frames per step across 1, 12, 50, 100 and 200 moving controls on an isolated fixture canvas, timing the per-frame JavaScript work, counting Long Animation Frames over 50 ms, and probing document.elementsFromPoint() after moving controls to test whether Chromium's hit-test cache went stale.

Not run yet.
Controls Route JS median JS p95 Geometry loop Frame median LoAFs (>50 ms) elementsFromPoint() hits
Press "Run overhead sweep" to measure this browser.

How it works

The arena puts N moving buttons and one moving text input through four paths: plain DOM moved with CSS transform: translate3d(), a 2D drawable canvas calling drawElementImage(el, x, y, w, h), and one WebGL 2 ElementGL context calling updateElementGeometry() either alone or paired with el.toggleAttribute('data-hit').

In Chromium 157 and Canary 160, moving a drawable element's geometry with updateElementGeometry() after the browser has already hit-tested it can leave Chromium's hit-test cache pointing at the old rectangle until a DOM attribute or style change invalidates it. The third mode leaves that toggle off on purpose so you can see and measure stale misses and ghost hits. The fourth mode turns the toggle on so you can measure what invalidating 1 to 200 elements every frame costs in JavaScript time, style recalculation and Long Animation Frames.

Every tap, drag and keypress inside the arena is observed with PerformanceObserver({ type: 'event', durationThreshold: 0 }). Each entry is split into input delay (processingStart - startTime), processing duration (processingEnd - processingStart) and presentation delay (startTime + duration - processingEnd). Chromium rounds Event Timing duration to 8 ms steps for privacy, so presentation delay is clamped at zero when rounding pulls the total slightly under processingEnd. On every pointer down, the page compares your pointer coordinates against the drawn control rectangles and document.elementsFromPoint() to count exact hits, stale misses and ghost hits at old positions.

Live checks

These checks build their own fixtures on the hidden test stage and wait for a tap so loading this page never opens a WebGL context or runs a benchmark loop unasked.

StatusCheckDetail

Findings