3b1b / 3Blue1Brown.com

https://www.3blue1brown.com
Other
344 stars 124 forks source link

Improve performance score (Lighthouse/Core Web Vitals) #107

Open PullJosh opened 3 years ago

PullJosh commented 3 years ago

(Pretty sure @kurtbruns knows more than I do about this, so hopefully he's willing to help.)

Google has an ambiguously-branded tool, sometimes called Lighthouse, other times spoken about as "core web vitals", and other times just plopped on web.dev with no name. In Chrome devtools it's under the "Lighthouse" tab.

It tests the performance and accessibility of a website, and as far as I know it's pretty much the gold standard for measuring the basic user experience.

Right now, our performance score is total trash.

image

This kind of performance really matters, both for users and for SEO. We need to at least fix the low-hanging fruit, and it would be good to go a step beyond that and really make performance a priority, because it matters a lot, especially for people with low-end devices or spotty internet.

The good news is that this is definitely a solvable problem. (We can at least get 80% better for 20% of the work.) I haven't done a whole lot of digging, but there are a few major issues that Lighthouse is clearly highlighting:

PullJosh commented 3 years ago

Today I learned that Next has built-in support for measuring these web vitals!

kurtbruns commented 3 years ago

@PullJosh Attached to this comment are two lighthouse reports that I ran on the site. Can you run again, save and attach your report?

I've spent my fair share of time optimizing light house reports. My two cents is to pick low hanging fruit and to make changes that will definitely improve accessibility. That being said, the two reports I ran multiple times have scores that feel reasonable for an initial release, especially if it's a soft release. With a large audience and public repository we may see some thoughtful people weight in on site performance issues.

Happy to talk more about my experience and discuss improvements.

PS you may get a kick out of this article

lighthouse-3blue1brown.netlify.app:lessons:derivatives.pdf lighthouse-3blue1brown.netlify.app:lessons:essence-of-calculus.pdf

PullJosh commented 3 years ago

That's a relief! But I'm confused how you got those numbers. Are you just using the Lighthouse tab in Chrome devtools? That's what I did, and I was consistently getting performance results of 12 or lower.

Update: I just re-ran the tests using the same pages you did, and I got performance scores of 36 and 23. Better than earlier today, but still much worse than what you're seeing.

lighthouse-derivatives.pdf lighthouse-essence-of-calculus.pdf

kurtbruns commented 3 years ago

Yeah Lighthouse tab in Chrome Devtools

vincerubinetti commented 1 month ago

It seems like we removed Disqus?

Maybe we can replace with https://giscus.app/