Live data from Hacker News

How we improved our website's performance

smashingmagazine.com

61–70 of 76 posts

Re: How we improved our website's performance

#61
post #37

key takeaways: - fonts can be unnecessarily huge - monolithic js = slow. Chunk at build time. - content-visibility: auto for lazy rendering

Chunking JS just leads to massive latency issues as the client is forced to download dozens (or hundreds) of "efficiently" chunked JS files. The e-commerce platform Magento 2 is packed with this kind of bullshit and is part of the reason my colleagues and I abandoned it for our clients' large e-commerce websites: https://magento.stackexchange.com/questions/104583/magento-2... https://old.reddit.com/r/Magento/comments…

Magento 2 sucks, but clients are stupid and think that 10+ page loads are ok.

Re: How we improved our website's performance

#62

> Around the same time we switched from an (outdated) manually created critical CSS file to an automated system that was generating critical CSS for every template — homepage, article, product page, event, job board, and so on — and inline critical CSS during the build time. Yet we didn’t really realize how much heavier the automatically generated critical CSS was. Is reducing the total amount of CSS per page so you…

Whoa. I've never seen a page load this fast. How did you do it? Is there a blog post somewhere?

Re: How we improved our website's performance

#63

Earlier quoted context omitted.

But with 8kb zipped (I assume that following pages aren't that much worse) why should one optimize with a solution that adds that much complexity? I believe that shaving a few additional kb from this already low number isn't worth the proposed complexity. But this is a tradeoff that everybody has to decide for themselves.

> But with 8kb zipped (I assume that following pages aren't that much worse) why should one optimize with a solution that adds that much complexity? If that's the argument, why not just let them take the (tiny) initial 8kb hit as an external css file, and make the rest of the experience even "zippier"?

I would believe that 8k via an additional request would harm performance more than to inline it.

But haven't tested that yet.

Re: How we improved our website's performance

#64

> Around the same time we switched from an (outdated) manually created critical CSS file to an automated system that was generating critical CSS for every template — homepage, article, product page, event, job board, and so on — and inline critical CSS during the build time. Yet we didn’t really realize how much heavier the automatically generated critical CSS was. Is reducing the total amount of CSS per page so you…

phantastic. Design is not how something looks, it is how it works. (said Steve Jobs)

Do you folks know the entertaining talk http://idlewords.com/talks/website_obesity.htm?

Re: How we improved our website's performance

#65

> Around the same time we switched from an (outdated) manually created critical CSS file to an automated system that was generating critical CSS for every template — homepage, article, product page, event, job board, and so on — and inline critical CSS during the build time. Yet we didn’t really realize how much heavier the automatically generated critical CSS was. Is reducing the total amount of CSS per page so you…

The problem with inlining all CSS is serving all the global styles all over again with every page load. You're gaining a great first impression at the cost of a poorer experience for every subsequent page load. Have you considered inlining CSS in the head (as you've done), but then serving it again with a linked css file just before . Then, with subsequent page loads (of the current or other pages), you don't have to…

true, but if the 1st impression is great and the 2nd isn't worse – what else do we want?

Re: How we improved our website's performance

#66

Earlier quoted context omitted.

> I really can't understand why so many people rag on frontend development May be you should try to listen to them more carefully and make an attempt to understand their woes.

The problem is, most of those complaining have never tried to understand the complexity (and why it exists) because they've never built a highly complex frontend application! They're degrees removed and just throw stones from their glass houses. Guess what, I'm not picking Spring to make a simple REST api when it takes 5 lines in Expressjs. Why? Spring is complete overkill. So along those lines, should you use React/…

I agree with what you're saying.

I think what most people are frustrated about with the frontend ecosystem (And many other areas of software) is actually misuse of tools.

Re: How we improved our website's performance

#67

> Around the same time we switched from an (outdated) manually created critical CSS file to an automated system that was generating critical CSS for every template — homepage, article, product page, event, job board, and so on — and inline critical CSS during the build time. Yet we didn’t really realize how much heavier the automatically generated critical CSS was. Is reducing the total amount of CSS per page so you…

How did you create the screenshot SVG and other SVGs?

Re: How we improved our website's performance

#68

> Around the same time we switched from an (outdated) manually created critical CSS file to an automated system that was generating critical CSS for every template — homepage, article, product page, event, job board, and so on — and inline critical CSS during the build time. Yet we didn’t really realize how much heavier the automatically generated critical CSS was. Is reducing the total amount of CSS per page so you…

How did you create the screenshot SVG and other SVGs?

SVG screenshots are documented here: https://www.checkbot.io/article/web-page-screenshots-with-sv...

The main trick is to view your web app in a browser, print to PDF and then use Inkscape to auto convert from PDF -> SVG (with some caveats). Worst case you could recreate the screenshot from scratch in a vector editor.

The SVG icons are licensed from https://icons8.com/ (recommended!).

Re: How we improved our website's performance

#69

> Around the same time we switched from an (outdated) manually created critical CSS file to an automated system that was generating critical CSS for every template — homepage, article, product page, event, job board, and so on — and inline critical CSS during the build time. Yet we didn’t really realize how much heavier the automatically generated critical CSS was. Is reducing the total amount of CSS per page so you…

Whoa. I've never seen a page load this fast. How did you do it? Is there a blog post somewhere?

I need to write it up but the SVG screenshot is documented on https://www.checkbot.io/article/web-page-screenshots-with-sv... and I'm using all the tricks from https://www.checkbot.io/guide/speed/ that the Chrome extension checks for.

The big wins are: don't require JS for any content in the page header, use minimal CSS + inline it, strongly prefer SVG images over bitmaps + inline them, use "font-display: swap" + go easy with how many fonts you need.

Re: How we improved our website's performance

#70
post #46

> Around the same time we switched from an (outdated) manually created critical CSS file to an automated system that was generating critical CSS for every template — homepage, article, product page, event, job board, and so on — and inline critical CSS during the build time. Yet we didn’t really realize how much heavier the automatically generated critical CSS was. Is reducing the total amount of CSS per page so you…

Just wanted to say that I’ve been using Checkbot for years and it’s great

Thanks, that made my day. :)
Post reply on HN