Skip to content

core(lantern): account for slow document response in LCP - #17150

Open
hjanuschka wants to merge 1 commit into
GoogleChrome:mainfrom
hjanuschka:fix-lcp-high-ttfb
Open

core(lantern): account for slow document response in LCP#17150
hjanuschka wants to merge 1 commit into
GoogleChrome:mainfrom
hjanuschka:fix-lcp-high-ttfb

Conversation

@hjanuschka

@hjanuschka hjanuschka commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Lantern estimates server response time using the median across an origin. When the main document is much slower than static resources on the same origin, that median can make simulated LCP occur before the observed TTFB.

Use the main document's estimated response time when it exceeds the response time used by the simulation. Apply the difference to the simulated LCP and its optimistic and pessimistic estimates.

Add regression coverage for a slow main document and update the expected LCP breakdown timings.

Related Issues/PRs

Fixes #16213

Use the main document's response time when it exceeds Lantern's
origin-level estimate so simulated LCP includes high backend latency.

Fixes: GoogleChrome#16213
@hjanuschka
hjanuschka requested a review from a team as a code owner July 30, 2026 06:53
@hjanuschka
hjanuschka requested review from connorjclark and removed request for a team July 30, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

High TTFB causes implausible LCP and negative LCP subpart

1 participant