Menu

Not Every CSS Change Deserves a Full Rescan
📰

Not Every CSS Change Deserves a Full Rescan

DEV Community: javascript·KhaledSalem·3 days ago
#5vyfs4Bn
#devtojavascript#devto#dev#work#changes
Reading 0:00
15s threshold

How a Tailwind performance regression led to a new optimization experiment in Ionify.

Sometimes a small performance regression reveals a much more interesting architectural question.

That happened recently while I was working on Ionify, my open-source frontend build tool.

A developer reported that changing Tailwind classes could trigger a full rescan.

In an affected 100-file-change workload, build time increased from roughly 300 milliseconds to 1.3 seconds.

For a tool focused on avoiding redundant computation, that was exactly the kind of problem worth investigating.

And it raised a familiar question:

Why are we repeating work when we might already know which parts actually need to change?

The Hidden Cost of Treating Every Change Equally

Tailwind needs information about the classes and styles used by an application to produce correct CSS.

That's necessary work.

But it doesn't automatically follow that every CSS change requires rediscovering every relevant piece of information.

Consider two…

Continue reading — create a free account

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