Search code examples
lighthousegoogle-pagespeed

When does start the timer for metrics like First Input Delay, First Contentful Paint?


We're using the Google PageSpeed Insights to get the lighthouse data for our site https://developers.google.com/speed/docs/insights/v5/get-started. In our team we've an internal discussion which we don't get any conclusion and we don't find the answer.

When does the time measurement for metrics like First Contentful paint, First input delay starts?

Does they include the time to first byte + the time to donwload the html or they measurement starts from the moment the html page has be donwloaded?

Thanks.


Solution

  • When does the time measurement for metrics like First Contentful pain, First input delay starts?

    First Contentful Paint starts from when the navigation starts. For the real user data at the top of PageSpeed Insights this comes from when real users navigate to a page so it may include redirects as well as any connection setup time (DNS/TCP/HTTPS time) before the page actually starts loading. For the Lighthouse simulation below this it will be from the start of the test.

    First Input Delay (FID) in the real user section is from when an input happens (e.g. a user clicks on a button), until the main thread is free to start processing those event handlers. There is no Lighthouse equivalent as Lighthouse does not do interactions. Total Blocking Time (TBT) can indicate if there is a lot of work happening during page load which can be a cause of high FIDs.