GoogleChrome / lighthouse

Automated auditing, performance metrics, and best practices for the web.
https://developer.chrome.com/docs/lighthouse/overview/
Apache License 2.0
28.32k stars 9.36k forks source link

Compute LCP savings for `render-blocking-resources` #15240

Open adamraine opened 1 year ago

adamraine commented 1 year ago

https://github.com/GoogleChrome/lighthouse/pull/15238#discussion_r1258902571

render-blocking-resources computes savings using the FCP graph. In theory this savings estimate should be fine to use for LCP as well since render blocking resources are always loaded before FCP (i.e. none affect LCP and not FCP).

I do wonder how far this assumption goes, and if it's worth it to use the same calculation. Perhaps making a resource non-render blocking doesn't completely eliminate it's LCP impact.

paulirish commented 12 months ago

Related, we were looking at unused-js. Some of the items there can be are render-blocking. Others not. But when we compute estimatedSavings for unused-js, we treat them uniformly. (Roughly, all network scripts are half- blocking (per lantern magic 🧙‍♀️ ) We could adjust this behavior to have more precision in the savings calculation.