# Google klaagt over trage Interaction to Next Paint (INP) op Discourse-sites

**URL:** https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108
**Category:** General
**Tags:** seo
**Created:** [10 juli 2023 om 12:31 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108 "2023-07-10T12:31:47Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [10 juli 2023 om 12:31 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/1 "2023-07-10T12:31:47Z")

</div>

Hi there, first of all I’d like to say that I’m not one to chase after SEO or go out of my way to suit Google’s ~~demands~~ preferences on how my own site should look and work. But it’s worth knowing that Google just sent me an email about my site needing to improve on their new “Core Web Vital metric” that will soon start factoring very heavily into their rankings:

> **[Advancing Interaction to Next Paint  |  Blog  |  web.dev](https://web.dev/blog/inp-cwv)**
>
> The Chrome team announces that INP is no longer experimental and will replace FID as a Core Web Vital in 2024

Here’s the report on Discourse Meta, which is a bit worse than my own site for INP (372ms vs 208ms):

 ![Screenshot from 2023-07-10 07-13-48](https://global.discourse-cdn.com/meta/original/4X/b/b/6/bb649d1e174ec4c2b462b3de502f3a97663b0756.png)

Given that Discourse is basically a Javascript web app I image it won’t be easy to improve those metrics. But then again Google appears to be basing its ranking on the no-Javascript version that its web crawlers are seeing despite claiming to be emulating a Moto G Power phone…

 ![Screenshot from 2023-07-10 07-27-38](https://global.discourse-cdn.com/meta/original/4X/5/a/0/5a0006da9787628aaefba11ad1cf26ef99279075.jpeg)

…so I don’t really believe or care too much about what their algorithms and rankings determine. But it’s worth a heads-up for devs and site administrators to be aware of.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [10 juli 2023 om 13:02 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/2 "2023-07-10T13:02:08Z")

</div>

Hi @rahim123 - improving INP is one of the motivations for switching Discourse’s page navigation animation from a full-page ‘spinner’ to a slider. We only deployed that change to Meta last week, so it’s a little soon for the change to show up in Google’s web vitals survey data.

[https://github.com/discourse/discourse/commit/f92ed88c52645f0ddfddb9b88a7e08b2dc4ceff2](https://github.com/discourse/discourse/commit/f92ed88c52645f0ddfddb9b88a7e08b2dc4ceff2)

But rest assured we’re keeping an eye on the data and will look into making further tweaks if needed.

---

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [10 juli 2023 om 13:14 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/3 "2023-07-10T13:14:17Z")

</div>

Thanks a lot for the reply. Glad to hear you’re on top of this.

> [@david](#):
>
> switching Discourse’s page navigation animation from a full-page ‘spinner’ to a slider. We only deployed that change to Meta last week, so it’s a little soon for the change to show up in Google’s web vitals survey data.

I used Google’s live URL tester [https://pagespeed.web.dev](https://pagespeed.web.dev), so shouldn’t that already be included in the ranking? And since Google is seeing the no-Javascript version I’m not sure how it takes the spinner vs. slider into account? Doesn’t INP have to do with navigating from one page to another within the same website? In that case I don’t really understand how it gauges that metric for a single URL. Sorry for my ignorance, I’m far from an expert on these minutia relating to page architecture and Google’s latest whims.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [10 juli 2023 om 13:39 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/4 "2023-07-10T13:39:02Z")

</div>

> [@rahim123](#):
>
> I used Google’s live URL tester [https://pagespeed.web.dev](https://pagespeed.web.dev), so shouldn’t that already be included in the ranking? And since Google is seeing the no-Javascript version

Yeah, ‘pagespeed insights’ and google’s search crawler fetch the basic-html version of Discourse. So unfortunately these on-demand tools are not too helpful for us.

For search ranking, Google uses real-world data collected from users of Chrome on desktop and Android. They make that data available publicly at [Overview of CrUX &nbsp;|&nbsp; Chrome UX Report &nbsp;|&nbsp; Chrome for Developers](https://developer.chrome.com/docs/crux/). Unfortunately there’s a 1-2 month delay between collection and publication, which is why we need to wait a while before we can see the real-world impact of this new loading slider.

To see Google’s data for your own site (or for Meta), go here and enter the domain: [CrUX Dashboard &nbsp;|&nbsp; Chrome UX Report &nbsp;|&nbsp; Chrome for Developers](https://developer.chrome.com/docs/crux/dashboard/). Once you’ve loaded the report, there’s a tab for INP on the left hand side. IIRC, Google focusses on the ‘mobile’ data for search ranking, so you’ll need to use the device filter to dig into that.

Mobile data for Meta:

 ![SCR-20230710-mzkj](https://global.discourse-cdn.com/meta/original/4X/6/c/f/6cf39b288130ed36b1acc4cbd74b41b40549ca87.png)

The aim is to get at least 75% ‘good’ - that will mean that the P75 INP value which Google uses for search ranking is less than 200ms.

---

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [10 juli 2023 om 13:41 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/5 "2023-07-10T13:41:56Z")

</div>

> [@david](#):
>
> For search ranking, Google uses real-world data collected from users of Chrome on desktop and Android. They make that data available publicly at [Chrome UX Report - Chrome Developers](https://developer.chrome.com/docs/crux/).

Wow, never even heard of that. Thanks a lot for the explanation!

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [10 juli 2023 om 20:29 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/6 "2023-07-10T20:29:41Z")

</div>

As a datapoint, I have been exclusively using the discourse-loading-slider theme component since my site was live. I am still in the “needs improvement” zone

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/b/1/3b1cd9f8dae2d24721c325fffc8790a92921a3bb.png)

Particularly, it seems the pages that are accessed primarily by anonymous accounts coming from google perform the worst. Could be specific to my forum but thought it was worth sharing

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [11 juli 2023 om 19:41 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/7 "2023-07-11T19:41:28Z")

</div>

David, it does seem a huge perceived improvement, though I am fond of the old spinner 😉 Can you remind me what the high level technical change of approach here that facilitates that improvement? Has that been documented somewhere?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [11 juli 2023 om 19:49 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/8 "2023-07-11T19:49:42Z")

</div>

> [@merefield](#):
>
> Can you remind me what the high level technical change of approach here that facilitates that improvement?

The improvement to the INP?

With the old spinner, the sequence was

1. Click link
2. Ember tears down all DOM and cleans up components from the old route
3. Spinner rendered to screen
4. Once network request resolved, render new route to DOM

With the slider, we skip step 2. The slider gets rendered immediately, without needing to wait for the expensive teardown process.

> [@david](#):
>
> improving INP is one of the motivations for switching Discourse’s page navigation animation from a full-page ‘spinner’ to a slider

I should clarify here: the main motivation for us switching the default is the improved UX. The INP metric improvement is also nice, but not the primary reason for the change.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [11 juli 2023 om 19:51 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/9 "2023-07-11T19:51:03Z")

</div>

Yeah it’s the perception that matters most and not removing the content too soon is a nice touch. Great work!

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [11 juli 2023 om 20:17 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/10 "2023-07-11T20:17:28Z")

</div>

It’s very important to note that INP will only impact site rank in March 2024, so the improvements that we are working on today have time to be iterated upon before it starts affecting Google.

> **[Interaction to Next Paint (INP)  |  web.dev](https://web.dev/articles/inp)**
>
> This post introduces the Interaction to Next Paint (INP) metric and explains how it works, how to measure it, and offers suggestions on how to improve it.

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [12 juli 2023 om 00:36 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/11 "2023-07-12T00:36:32Z")

</div>

> [@merefield](#):
>
> though I am fond of the old spinner

I am quite fond of the old one as well. Is it possible for us to have a theme component (or perhaps a user setting) for the old spinner?

---

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [12 juli 2023 om 05:03 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/12 "2023-07-12T05:03:03Z")

</div>

> [@Firepup650](#):
>
> (or perhaps a user setting) for the old spinner?

There is a system-wide setting to switch back: `page loading indicator`

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [12 juli 2023 om 06:46 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/13 "2023-07-12T06:46:31Z")

</div>

> [@rahim123](#):
>
> There is a system-wide setting to switch back

True, but some people do like the new one, and I’d prefer not to mess with their settings.

Also, IIRC, that switch is planned to be removed soon.

---

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [12 juli 2023 om 12:35 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/14 "2023-07-12T12:35:49Z")

</div>

> [@Firepup650](#):
>
> Also, IIRC, that switch is planned to be removed soon.

Oh, I thought they just recently added it?

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [12 juli 2023 om 16:08 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/15 "2023-07-12T16:08:32Z")

</div>

> [@rahim123](#):
>
> Oh, I thought they just recently added it

True, but see this:

> [@3.1.0.beta6: Threads in Chat, Image Grid, Export Chat Messages, and more](https://meta.discourse.org/t/3-1-0-beta6-threads-in-chat-image-grid-export-chat-messages-and-more/270337/1):
>
> The old `spinner` is planned to be removed in the near future, but remains an option for the time being by changing the `page_loading_indicator` site setting from `slider` to `spinner`.

---

<div class="post-metadata">

### Author: ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)
#### Post date: [17 juli 2023 om 04:06 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/16 "2023-07-17T04:06:06Z")

</div>

> [@david](#):
>
> They make that data available publicly at [Chrome UX Report - Chrome Developers](https://developer.chrome.com/docs/crux/). Unfortunately there’s a 1-2 month delay between collection and publication, which is why we need to wait a while before we can see the real-world impact of this new loading slider.

For your own domain data like `meta.discourse.org` there is always a recent report in Google Search Console hidden inside ‘Experience’ → ‘Core Web Vitals’ → ‘Mobile (Open report)’ and scroll down to ‘INP issue: longer than 200ms (mobile)’

 ![grafik](https://global.discourse-cdn.com/meta/original/4X/8/2/5/8254955ebfd27e95812fa6438971d5f598ed6240.png)

---

<div class="post-metadata">

### Author: ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)
#### Post date: [17 juli 2023 om 04:22 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/17 "2023-07-17T04:22:11Z")

</div>

> **Edit: This is more on the low-probability/high-impact scale. INP only takes p75 into account.**
>
> The INP might be influenced by the post ?cooking? procedures (= feature enhancement via JS on loading) of the Matomo core or plugins which do some ‘heavy’ JS tasks having a large ‘render blocking time’.
> 
> Especially when the user switches to another thread, there are like 10-20 posts “cooked” at once.
> 
> Here its always good to split the tasks for individual posts into separate `setTimeouts()` to allow the browser to do painting in between the individual tasks and not wait for the whole process to finish.
> 
> E.g. something like this:
> 
> ```js
> var initializeSliderSlickItem = function (item) {
> /* do the actual initialization here */
> var $this = $(item);
> […]
> };
> 
> $('.slider-slick').each(function () {
> var item = this;
> setTimeout(initializeSliderSlickItem, 0, item);
> });
> 
> ```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [17 juli 2023 om 12:38 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/18 "2023-07-17T12:38:21Z")

</div>

> [@rrit](#):
>
> The INP might be influenced by the post ?cooking? procedures

Are you sure about that? When going from a topic to another, the **next paint** will be the loader at the top of the page, that starts right away.

---

<div class="post-metadata">

### Author: ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)
#### Post date: [17 juli 2023 om 15:18 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/19 "2023-07-17T15:18:12Z")

</div>

> **Edit: This is more on the low-probability/high-impact scale. INP only takes p75 into account.**
>
> > [@Falco](#):
> >
> > When going from a topic to another, the **next paint** will be the loader at the top of the page, that starts right away.
> 
> … and afterwards the cooking starts. If the user then clicks on something while a Discourse cooking task is running, Google measures INP as the time until next paint. Next paint might appear earliest on finish of the running cooking task.
> 
> See [web.dev: INP: What is an interaction](https://web.dev/inp/#whats-in-an-interaction)
> 
> ![Ng0j5yaGYZX9Bm3VQ70c](https://global.discourse-cdn.com/meta/original/4X/7/3/3/733c2c204e85976bb6b9aba099c08c9dec5f2b03.svg)
> 
> > “The life of an interaction. An input delay occurs until event handlers begin running, which may be **caused by factors such as long tasks on the main thread [e.g. “cooking”]**. The interaction’s event handlers then run, and a delay occurs before the next frame is presented.”
> 
> * * *
> 
> Google takes the longest paint blocking time into account for INP if there are multiple blocking events “throughout the entire page’s lifecycle”. Lifecycle like:
> 
> 1. URL thread “A” opens
> 2. spinner shows
> 3. cooking posts in thread “A”
> 4. Click 1: user clicks link to thread “B”
> 5. spinner shows
> 6. thread “B” loading
> 7. cooking posts in thread “B”
> 8. Click 2: user clicks link to thread “C” while thread “B” is still cooking
> 9. the running cooking action on thread “B” finishes (\<-- counts into INP for Click 2 )
> 10. spinner shows
> 11. thread “C” loading
> 12. cooking posts in thread “C”
> 13. …
> 
> Also [web.dev: INP: What is an interaction](https://web.dev/inp/#whats-in-an-interaction)
> 
> ![vNosnKDYgBRnFmEvwm0c](https://global.discourse-cdn.com/meta/original/4X/f/3/f/f3fa4893634869964bb80624f3997b5383420ce1.svg)
> 
> > “INP is calculated when the user leaves the page, resulting in a single value that is representative of the page’s overall responsiveness throughout the entire page’s lifecycle.”

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [17 juli 2023 om 17:28 UTC](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108/20 "2023-07-17T17:28:59Z")

</div>

Good thing that using the p75 of the metric means that no one needs to really worry about this scenario you painted, and it’s clearly not representative of normal interactions with Discourse.

[Volgende pagina](https://meta.discourse.org/t/google-complaining-about-slow-interaction-to-next-paint-inp-on-discourse-sites/271108.md?page=2)
