☔️LCP Interesting Cases
See original GitHub issueSince LCP is a new metric in 6.0 I thought we might want to get ahead of some of the more challenging cases that will end up dramatically affecting scores. Inspired by the results of @connorjclark’s great analysis on score movement for 11ty pages.
Very large image problem
Lighthouse accuracy: Simulated is right and observed is wrong Field accuracy: probably mostly wrong Example URL: https://peterthaleikis.com/ The Problem: LCP is gated on the loading a very, very large image. Observed methods will never wait long enough to see the LCP event generated by the loading of this image and will end up picking the second largest paint as the LCP even instead. Simulated method doesn’t care about waiting and just correctly says that loading that image will take 3 minutes, so LCP is 3 minutes out. This is extra problematic in field use cases. Because input stops LCP computation most RUM metrics will likely pick the second largest paint as LCP as well, so all data will point to Lighthouse being wrong when it’s really the only thing correctly identifying the problem.
(renderTime
is ambiguously defined in the LCP spec but in the closely related element timing spec it’s referred to as the equivalent of the next paint after the onload
event would have fired)
Many images before LCP
Lighthouse accuracy: Observed is right and simulated is wrong Field accuracy: probably all correct Example URL: https://templates.netlify.com/ The Problem: Lantern-specific issue that assumes all the images before LCP were necessary when only the largest onscreen one was, this is probably worth addressing before 6.0 final as it takes otherwise very performant sites and brings them down to an LCP of 0
Observed:
Simulated:
Lantern Trace:
WAI
Lots of cases in that doc are great signs of Lighthouse catching bad perf that we were passing before, so just wanted to recognize the good cases too 😃
https://2018.nejsconf.com/ for example has a very large background image that pushes out LCP even though all other metrics are fast.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:14 (3 by maintainers)
Top GitHub Comments
Agreed. “unknown”, “did not finish”, anything of the sort that doesn’t lead someone to incorrectly count the first paint and think LCP was 2s.
Lighthouse has no remaining AIs here. CSM will carry the torch on handling these.