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
The minimum versions where number-flow turns animations on are Chrome 125 and Safari 17.2. A record of the decisions made while building a fork that lowers this floor to Chrome 66 and WebKit 16.4, the two judgment calls I ended up reversing, and the Safari bug investigation that made me give 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. This post records how 0.2.0 moved additive compositing into transform and opacity keyframes, how the change was measured, and the costs that 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.
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. The post records performance reports that changed with the font, an anonymized code review, and the follow-up experiment that ended with keeping the mask default.
Updated
32 min · read