Web

How web bloat impacts users with slow devices

A great post by Dan Luu looking at the relative performance of different web platforms running on devices with limited CPUs.

How web bloat impacts users with slow devices

I love Dan’s in-depth posts so much. The amount of detail and care that goes into these is incredible. Also cool to see Ghost up there in the top tier of performance. A few thoughts on that:

All good platforms rendering a basic page are spitting out cached HTML/CSS. So while they may have vastly different perf at scale and under load, where other things become a bottleneck (often DB connection), a single page load is a more neutral comparison with less variance.

So what is the variance? As best I can tell: Mostly clientside JS.

All the modern platforms tend to make heavy use of client side JS libraries like React to render their UI. Discourse, which came out worst in this article, loads an entire Ember.js app to render its front end.

Meanwhile, all the platforms at the top of the list either have no JS at all, or vanishingly small amounts of it.

Ghost just creeps into this category, somewhat intentionally and somewhat by luck.

The intentional part: we modeled our front end after WordPress circa 2012. Server side templating (but logicless, so more performant) and absolutely zero JS required to render the front end of your site. A theme can sprinkle in JS as a progressive enhancement, but it’s not a requirement.

The lucky part: we actually do load a little bit of React on the front end these days, but not enough to have a meaningfully negative impact. We essentially have embedded front end widgets for managing components that can’t function (well) without JS. Particularly search, member signups/logins, and payments. These are unavoidable for creating the features and functionality that we want to deliver to users, but do add some overhead to the front end for perf.

I suspect we could lighten them up further by using something like HTMX, which might be an interesting path to explore in future.

Made with Ghost