Discourse Loading Time

Hi,

What is the Discourse team’s approach to how quickly Discourse loads?

The spark for the discussion is that Google will be using site speed as a ranking factor for mobile searches starting in July - Official Google Webmaster Central Blog: Using page speed in mobile search ranking.

Their take is based on a variety of studies. E.g., The current benchmarks:

That’s far too slow when you consider that 53% of mobile site visits leave a page that takes longer than three seconds to load.2

For instance, meta itself is ranked ‘slow/medium’ for page speed and optimization on mobile devices at Google’s developer tool:
https://developers.google.com/speed/pagespeed/insights/?url=meta.discourse.org

At the same tool, but with data from the Chrome User Experience Report:
https://developers.google.com/speed/pagespeed/insights/?url=site%3Ahttps%3A%2F%2Fmeta.discourse.org

Well, the official part beside, I cannot see any slow working stuff with meta or other hosted discourse instances. Even my 1 core 2gb cloud setup is even faster than my Shopware Shopsystem which has page speed of 80%+. So, what is going wrong, Discourse or the google developers stuff?

1 Like

Google and other search engines do not see the site in the form in which it shows in developers.google.com

index

He sees the site:

index3

In this version, all data is completely different.

developers.google.com - for users

Nature of the beast; we are a JavaScript application, so the app has to be delivered to the browser.

It is a bit like if you were measuring smartphone app startup times, including the time spent to download and install the app from the app store as part of the “startup” time.

What isn’t shown is that subsequent page loads are blindingly fast in Discourse because the app is loaded in the browser, and we only send API calls and json (the data necessary to render the page) down the wire.

13 Likes

If Google’s algorithm penalises PWA’s that wouldn’t be very smart!!

It’s obviously not reasonable to measure just the time for first load without considering subsequent in-app responsiveness?

I don’t think it’s completely unreasonable. Google’s job as a search engine is getting you the most relevant information as fast as possible — if a static HTML page has content of identical relevance they should probably favor that over downloading a web app… it’s totally likely you might not ever have a subsequent visit anyway (and if you do, I imagine that’s a bigger relevance factor than speed anyway).

Important to note that Google also reaffirms in their post that they’re only going to be penalizing the slowest of the slow… and more relevant content will likely always win anyway.

8 Likes

I have spent literally years following google good practices, building sites constantly scoring above 95% on every single rating tools google would give us and… I have seen countless sites with terrible scores and UX, ranking way better than me.

In the end it’s always the same, CONTENT IS KING, and perf/ssl/whatever will be a very small part of your ranking in the end. Not saying we are not committed to make Discourse as fast as possible. But I wouldn’t be too worried about this.

:+1:

12 Likes

Some numbers for context:

On desktop (first view empty cache)

  1. https://stackoverflow.com — 2.3 seconds 445K ( result )
  2. https://meta.discourse.org — 4.2 seconds 869K ( result )
  3. https://www.nytimes.com — 9.4 seconds 3600K ( result )

On mobile moto G (first view empty cache)

  1. https://stackoverflow.com — 2.6 seconds 220K ( result )
  2. https://meta.discourse.org — 8.8 seconds 827K ( result )
  3. https://www.nytimes.com — 46 seconds (interactive in 6) 6400K ( result )

Given that Discourse is an entirely JavaScript based application I think it stacks up quite well even against traditional “non JS” sites.

Despite the slightly slower initial load on mobile, using Discourse on mobile is FAR more enjoyable than other sites cause it has only a tiny network footprint while browsing around.

There is no chance Discourse is going to be punished here due to any of the numbers I am seeing, though as always we strive to make Discourse faster and better every release despite needing to ship an entire “engine” to a client to run the forum.

13 Likes

Thanks all! That makes a lot of sense. I appreciate the context and the explanation!

3 Likes

I’ve also noticed in my application a small slow loading time too (didn’t measure though). I use the free initial plan in digital ocean servers.

Would be amazing to have a plugin, theme or widget to add a configurable progress bar or spinner.

Well you are in luck, @david just released this:

I’m closing this topic though as it’s very old.

6 Likes