We moved Railway's frontend off Next.js. Builds went from 10+ mins to under 2 (blog.railway.com)

by bundie 217 comments 215 points
Read article View on HN

217 comments

[−] miyuru 37d ago
I just tried their domains page it took 10.8MB of data and took 2s for the DOM to be ready.

page actually took 17s to fully render with multiple shift changes.

all to render a domain search bar similar to google home page.

https://railway.com/domains

[−] toddmorey 37d ago
There are some easy optimizations wins for this page but none of the top ones are framework related. Maybe with the faster build times they can easily optimize images and 3rd party dependencies. As someone else pointed out, nearly half that data is unoptimized images.

For the curious, google's current homepage is a 200kb payload all in, or about 50 times smaller.

[−] mattmanser 37d ago
Who remembers sprite sheets? Does that give my age away?

I did an optimization pass for a client once where I got rid of a ton of the sprites but didn't have the energy to redo it all, so it just had huge sections that were blank.

Super snappy loading afterwards though.

[−] ricardobeat 37d ago
Yes, good times! With http2/3 they don't really matter anymore though, you get similar benefits from request pipelining.
[−] chrisweekly 37d ago
Spriting is actually harmful for performance except in specific HTTP-1 scenarios.
[−] staticautomatic 37d ago
Doesn't McMaster Carr still use sprites? Is that like the one optimization they managed to get wrong?
[−] flomo 36d ago
Looks like it, but isn't this site famous for being a "classic" storefront?

Some CMSs would auto-generate sprites. If you are showing most of them, it's still a positive, I'd assume. And, if it ain't broke, don't fix it.

[−] paulddraper 37d ago
I indeed remember.

HTTP 2+ (supported by every web browser) obviates sprite sheets.

They were a useful hack, but still a hack.

[−] petcat 37d ago
web dev is a sewer

All my projects are server rendered with jinja/minijinja, bootstrap, jQuery, and htmx when I need a little bit of SPA behavior on forms.

No builds, just static