yceffort
◆ SERIES 4 POSTS

Improving number-flow

A record of forking number-flow to support older browsers and improving its animation performance in modern browsers.

README

I made a fork of number-flow so that its number animations also work in older browsers. The first post covers an rAF fallback engine that preserves the original motion. The second post covers how the animation was reshaped so that it can run on the compositor thread, to reduce the style recalculation that remained even in modern browsers. The third post covers the forced synchronous layouts that repeated for every section and digit inside a single value update, and how 0.2.1 reduced them by separating DOM reads from writes, with measurements.

04 ITEMS

All posts

in order
01

Porting number-flow to Old Browsers: Five Decisions and Two Reversals

#browser#animation#oss
number-flow turns animations on starting from Chrome 125 and Safari 17.2. While building a fork that lowers this floor to Chrome 66 and WebKit 16.4, I reversed two decisions, and after investigating a Safari bug I gave up on automatic downgrading.
Updated
26 min read
02

Improving number-flow Performance: Moving Animations onto the Compositor Thread

#web-performance#animation#browser
In the number-flow fork I built to support old browsers, animations in modern browsers were still recalculating styles on every frame. In 0.2.0 I moved the motion built with additive compositing into transform and opacity keyframes, but costs remain in the mask and in interruptions.
Updated
24 min read
03

Reducing Forced Synchronous Layout in the number-flow Update Path

#web-performance#browser#debugging
Every time the value of number-flow changed, style and layout were being recalculated several times over. This post records the performance change observed after 0.2.1 reordered how the library reads and writes the DOM, and the costs that remain.
Updated
26 min read
04

How Far Will Agents Fix number-flow?

#web-performance#animation#debugging
I compared number-flow as fixed by five coding agents against my fork v0.2.1 once more. Performance reports changed with the font, the code went through a review with the authors hidden, and a follow-up experiment ended with keeping the mask default.
Updated
31 min read