question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TTI is reported as ~10 times what main thread work is

See original GitHub issue

Not sure if this is the right place to ask, it’s about the score at https://developers.google.com/speed/pagespeed/insights/ and not with a local LH. Sorry if this is the wrong place for this question!

Provide the steps to reproduce

  1. Run LH on http://scope.northeurope.cloudapp.azure.com/

What is the current behavior?

TTI is reported as 26s when main thread work is 3.3s and JS execution time is 2.0s

What is the expected behavior?

I’d expect our TTI to be a bit more than the total of main thread work. If I look at other sites TTI seems to be around main thread work * 0.1 but for us it’s almost main thread work * 10. One thing reported is that we don’t serve images in next gen formats which has a potential saving of 13s, but image loading shouldn’t impact TTI, right?

Environment Information

EDIT: Pin code is 2016 if you want to look at the site, we automatically let the LH user agent through.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
andersekdahlcommented, Oct 14, 2019

Big thanks for your quick answers, now I know how to tackle this!

0reactions
patrickhulcecommented, Oct 14, 2019

So if we have these large images that aren’t optimized and take 20s to load and we also have an onload event listener on them, that wait time gets included in TTI?

Roughly, yes.

That is, even if nothing happens between 5s and 25s except for image loading our TTI will be 25s?

Assuming you don’t reach network quiet before then, yes 😃

We have a bunch of prefetch directives for additional JavaScript files. Could it be that these are downloaded in the background but affects TTI since the network isn’t quiet?

I only briefly looked at this page, but I would guess that contributes significantly, yes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Total Blocking Time (TBT)? - NitroPack
Total Blocking Time (TBT) is the amount of time during which Long Tasks (all tasks longer than 50ms) block the main thread and...
Read more >
Total Blocking Time (TBT) - web.dev
The main thread is considered "blocked" any time there's a Long Task—a task that runs on the main thread for more than 50...
Read more >
What is Time to Interactive (TTI)? [+How to Improve] - Edgemesh
This occurs at a point when the last Long Task finishes and is followed by 5 seconds of network and inactivity on the...
Read more >
How to Improve Time to Interactive (TTI) on WordPress
TTI measures how long it takes your page to be ready for interaction: how long the main JS thread is blocked and how...
Read more >
First Input Delay (FID) and Total Blocking Time (TBT) Explained
As stated above, any task that takes a long time to complete, therefore blocking a browser's main thread and preventing it from executing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found