Lighthouse: Time to Interactive - Impact due to 3rd party scripts though invoked after onload event

Created on 6 Jul 2020  路  2Comments  路  Source: GoogleChrome/lighthouse

Time To interactive (TTI):

  1. It is highly effected by third party scripts.
  2. There are many third party scripts on the pages (which many sites do), so TTI gets pushed way out. In some cases it鈥檚 almost close to full page load.
  3. As TTI is used in page speed score calculation, score does not improve much, especially for mobile device browsers.

For lighthouse 6.xx version, Total Blocking Time is introduced which calculates total amount of time for long tasks between FCP and TTI. So here also, due to 3rd party scripts even loaded after onload event has the impact on page speed score calculation.

Few queries:

  1. Were there any changes to TTI metric in past 1 year?
  2. Is there a way to improve calculation of TTI metric?
needs-priority pending-close question

Most helpful comment

Thanks @patrickhulce for swift response and detailed inputs :)

All 2 comments

Were there any changes to TTI metric in past 1 year?

Nope.

Is there a way to improve calculation of TTI metric?

I think our definitions of "improve" will be different ;) The issues you describe are features of TTI that are working as intended.

There are many third party scripts on the pages (which many sites do), so TTI gets pushed way out.

This is intentional. Third-party scripts have a significant impact on the user's ability to interact with the page. TTI captures this.

In some cases it鈥檚 almost close to full page load.

This is also intentional. If every resource causes a longtask when it loads, then TTI will be the same as full page load time by design.

So here also, due to 3rd party scripts even loaded after onload event has the impact on page speed score calculation.

Deferring to onload won't do much for either of these metrics. True deferral here requires not loading the third-party at all for some subset of users (examples: only load the chat widget when they've clicked the chat button, show a still of a YouTube image and only load YouTube when the user clicks play, etc). Don't do the work at all instead of just reordering the work :)

Thanks @patrickhulce for swift response and detailed inputs :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnfrancisli picture johnfrancisli  路  3Comments

muuvmuuv picture muuvmuuv  路  3Comments

shellscape picture shellscape  路  3Comments

codepodu picture codepodu  路  3Comments

workjalexanderfox picture workjalexanderfox  路  3Comments