web-vitals icon indicating copy to clipboard operation
web-vitals copied to clipboard

Difference in LCP measurements in web-vitals library and Lighthouse (No throttling)

Open AnchalGupta3 opened this issue 5 years ago • 2 comments

Screenshot 2020-11-23 at 3 19 56 PM Screenshot 2020-11-23 at 3 20 16 PM

I had implemented the web-vitals library in the website and ran lighthouse from dev tools. As shown in the screenshots, for the same run, web-vitals library is reporting LCP at 4.2s, whereas Lighthouse is reporting LCP at 7.9s. Could you please tell me, why am I getting different results in the same run?

AnchalGupta3 avatar Nov 23 '20 09:11 AnchalGupta3

Ciao @AnchalGupta3, the key of the answer is that you are comparing 🍊 with 🍏. One is a Lab Data and the other is Field Data. Even if at the core might seems the same, the logic and heuristic behind those two are different and they should never be compared. Use the Lab Data to prevent quick regression before deploying in Prod, or better understand opportunity Lighthouse will advice to work on, and use Field Data with a large set of users to see how your product will perform differently with different device, network and platforms.

Zizzamia avatar Dec 05 '20 08:12 Zizzamia

@AnchalGupta3 is this still an issue? I would expect the numbers to be the same for the same run, so presumably this was a bug that has been fixed?

philipwalton avatar May 28 '21 20:05 philipwalton