Google is slow
Tags: google, optimization, webdev
Published: 2019-05-01 12:37:02

---
title: Google is slow
published: true
description: If you ask Google, Google is slow.
tags: 
  - google
  - optimization
  - webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/yzk548v08nyyibwob4wi.jpg
---

It's not me who says it, it's Google.

But first let's review a few basic rules of the Internet:

> Thou shalt not make slow websites

&mdash; _The book of Zhiheng Wang and Doantam Phan [2018:1:17](https://webmasters.googleblog.com/2018/01/using-page-speed-in-mobile-search.html)_

This certainly does not come as a surprise, since Google [makes](https://developers.google.com/amp/) [endless](https://play.google.com/store/apps/details?id=com.android.chrome&hl=en) [statements](https://developers.google.com/speed/) [about](https://www.youtube.com/watch?v=aXJklICrFJI) [speed](https://dev.to/nickytonline/google-to-pay-javascript-frameworks-to-implement-performance-first-code-3f57).

## The PageSpeed of Google

And how nice from Google, they _do_ provide tools to help us making our websites faster. Surely they must be showing the way. Let's take a look.

Starting easy, what about the blog post quoted above saying that speed will impact your SEO? It's a blog post, just text and a few boxes. Nowadays Webpack will optimize the shit out of your code and assets without you lifting a finger, so on that kind of website it's almost impossible to get less than 95% right?

![78/100](https://thepracticaldev.s3.amazonaws.com/i/um9rdr0r0okp6s8c52o0.png)

Okay wait. But it's an old website. They didn't necessarily know at the time. Let's have a look at something else. Surely when they created the website for Google Lighthouse they had all the tools and optimizations in mind.

![49/100](https://thepracticaldev.s3.amazonaws.com/i/lm8nsp0v9ftwspk6snmm.png)

Damn. There certainly is a reason for that. There is a lot of content on that webpage and at some point you need to make sacrifices. Could we get a look at a representative website for "a lot of content"? Wikipedia looks very suited for this kind of comparison. It's full of old PHP code and will probably be bloated from all sides.

![94/100](https://thepracticaldev.s3.amazonaws.com/i/tjalehqm62okhfwjhf8u.png)

Apparently not. Wikipedia is completely in the green. And if you look at the warnings, most of them seem to be perfectly conscious decisions.

Whilst speed sounds pretty important for Google, looking at their websites reveals that they are far from the standards that they set on their own. And I'm not even talking about how the [AMP webpage only gets 83%](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fdevelopers.google.com%2Famp%2F) nor how [google.com has a 70ms input latency](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.google.com%2F).

## The Embeds of Google

Of course the Lighthouse is just one of the tools. There is many others provided by Google like Google Analytics, YouTube or Google Fonts. As they're destined for outside use &mdash; and indeed wildly used &mdash; the only expectation you can have is that they provide the state of the art experience.

In order to check this out, I've created a few benchmark pages.

- [A baseline](https://xowap.github.io/google-bench/plain.html) which only contains a `h1`
- [A Google Analytics](https://xowap.github.io/google-bench/ga.html) (via gtag.js) version of that page
- [A Google Fonts](https://xowap.github.io/google-bench/fonts.html) version as well
- And for videos
  - [YouTube](https://xowap.github.io/google-bench/youtube.html) version
  - [Plyr](https://xowap.github.io/google-bench/plyr.html) version to see how another video player performs

You can run all those in PageSpeed and you'll notice that neither [Google Analytics](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fxowap.github.io%2Fgoogle-bench%2Fga.html) nor [Google Fonts](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fxowap.github.io%2Fgoogle-bench%2Ffonts.html) will hurt your website's speed. Though there is a few warnings creeping at the bottom of the report but they don't actually seem to affect the score.

On the other hand, if you [run it with YouTube](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fxowap.github.io%2Fgoogle-bench%2Fyoutube.html)... Well the page's score **drops to 75%**! YouTube is just killing your web page. Is this inherent to video playing? That's why I also [benched Plyr](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fxowap.github.io%2Fgoogle-bench%2Fplyr.html) which still gets a 99% score.

## Key learnings

Google has always been putting a very strong emphasis on speed, yet you can see a double standard emerging.

- Things that can sell advertisement is very, very fast. The Google Analytics/gtag embed shows just that.
- Key products, like Google itself, stay quite fast while you can see some compromises made which impact performance in a non-noticeable manner.
- But other products, like the developer website or the YouTube player have a disastrous performance score.

We've also shown that whilst those secondary products have bad performance there is  alternatives which can display a much higher score.

From afar, Google seems mighty and powerful but it seems that they are unable to produce high-quality work on several areas that are important to us commoners. There is probably reasons for that but I don't really care about them: the stand they're taking is way too strong to go away with excuses.

In the end, what I'll remember from this research is:

1. Don't swallow Google's hypocritical crap
2. Believe in yourself, doing better than Google is really not so hard 💪