Menu

1 / 4

What I learned measuring Pretext.js: things browser benchmarks don't tell you

DEV Community·Artem Zverev·6 months ago
#wrlZGi31
Reading 0:00
15s threshold

A while ago — though by current standards that already feels like ancient history — Twitter was loud with discussion of Pretext.js , a text-layout library whose headline claim is dramatic speedup over standard DOM measurement. Instead of letting the browser's layout engine compute text dimensions, it does the equivalent work in pure JavaScript on top of data prepared once via prepare() . The result, in theory, is no force-reflow on every measurement.

Demos from different people looked impressive, so I got curious about how fast this actually is in practice. There was just one detail: I'm not particularly good at performance measurement.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.