Decode pool — scrub a high-res photo timeline on a canvas
Sixteen local PNG frames (~1-3MB each) rendered to a canvas as you drag the slider. Each panel has its own Run button so you feel the difference. Left: img.src = url per scrub, with a main-thread decode on every tick. Right: warm a DecodePool up front, then every scrub is a single blit of a cached ImageBitmap. Scrub quickly and watch the per-frame time.
Cache-bust
Decode on scrub — img.src = url
Setup—
Avg scrub frame—
Slowest scrub—
Scrubs—
—
—
click Load frames to start
frame
— / 16
Pre-decoded — DecodePool
Setup—
Avg scrub frame—
Slowest scrub—
Scrubs—
—
—
click Warm pool to start
frame
— / 16