Feature Library

GPU page runtime

0.20 GPU · 1.43 CPU ms
A still of the GPU page runtime demo
Still
The live demo starts when it’s in view.Scroll the page and watch widgets sleep · Lose the device · Break a shader · Switch the accent

Many small WebGPU widgets on one page share one device, one command encoder and one submit a frame.

What it costs a frame

0.20 ms
1.43 ms
GPU
0.20 ms
CPU, median
1.43 ms
CPU, 95th pct
2.42 ms
Draw calls
0
Weight
Moderate

Measured 11 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured with the demo running itself: new data every 0.5 s for the three line charts and the gauge, a pointer sweeping the glow card, the bars’ highlight stepping, the backup ring running and a flare on the overlay every 1.5 s. The throughput chart scrolls in and out of view. GPU time is every pass of the frame (one per awake canvas), from timestamp queries. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool0.201.432.42
apple · Apple A19 Proin a browser tab · 16 November 20262.841.883.70
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20260.260.932.74

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

How steadily it runs on Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab

Typical frame ?
16.66 ms
1% low ?
50 fps
Varies by ?
±0.54 ms
All metricsIntel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab
p50p95p9916.02 ms19.42 ms +
How long each frame took. Most frames sit in the tall bars; a long tail to the right is hitching.

Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.

Frames

Median (p50) ?
16.66 ms
p95 ?
17.42 ms
p99 ?
18.09 ms
Slowest ?
22.84 ms
Mean ?
16.71 ms
Standard deviation ?
0.54 ms
1% low ?
50 fps
0.1% low ?
44 fps
Hitches ?
0 of 600
Over budget ?
0 of 600

Main thread

Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.0 / 2.4 / 3.7 ms

Input

Interactions ?
43
Input to paint ?
5.5 ms, worst 12.2
Longest handler ?
0.0 ms

Memory

JavaScript heap ?
98.0 → 82.6 MB
Growth ?
-15.35 MB

What it needs

Renders with
WebGPUNeeds WebGPU: current Chrome and Edge, Safari 26+, Firefox 141+ on Windows.
Your browser
Checking…Looking for WebGPU
Depends on
NothingNo other packages

What it’s for

  1. Dashboards with many small charts and gauges
  2. GPU sparklines, meters and cards in an ordinary page
  3. Design systems whose components draw with WebGPU
  4. One overlay for effects that belong to no element
  5. Surviving a lost GPU device on phones and laptops
  6. GPU colours that follow the page’s light and dark themes

Pitfalls, in brief

  1. One device for the page, or nothing is shared: a canvas configured with one device can’t draw another device’s textures, and every device pays its own pipelines.
  2. A lost device takes everything made on it: buffers, bind groups, pipelines and the canvases’ configuration. setup() must build all of it again from your data (the runtime calls it on the new device), so keep the data on the CPU, not only in GPU buffers.
  3. After a loss, ask a new adapter: an adapter hands out one device, and requestDevice() on the old one fails.
  4. device.destroy() reports the loss with reason "destroyed", the same as your own dispose().
  5. IntersectionObserver ignores display: none and zero-size boxes: a canvas that is hidden never counts as on screen.
5 more in brief
  1. A widget that skips its draw while a pipeline compiles stays awake (it would never draw otherwise).
  2. getComputedStyle gives a custom property’s text as written, with var() filled in: a color-mix() or a named colour is not something the parser can read, so it goes through a hidden element’s computed colour (in context) and then a canvas.
  3. The theme watcher sees attributes, not stylesheets: a theme switched by swapping a stylesheet or a class you didn’t name needs runtime.themeChanged().
  4. A canvas that changes size is cleared: the runtime sizes the backing store inside the frame, just before the widget draws, never in a ResizeObserver callback.
  5. Timestamp queries need the timestamp-query feature, which not every browser and adapter offer (2026). gpuTime() is then null; every pass of a frame is timed in one query set (32 passes at most).
10 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From My other apps. Fully custom code.

Björn Ottosson, A perceptual color space for image processing (OKLab, 2020): The OKLab to linear sRGB matrices in colour.ts, as published.

Inigo Quilez, 2D distance functions: The rounded-box distance in the demo’s shared WGSL (rbox).

raw webgpuwgslframe loopdraw on demandintersectionobservervisibilitychangedevice lostcreateRenderPipelineAsynccss tokensthemingtimestamp queriesfallbackdashboardsno dependencies

Near it in the frame