GoogleChrome / GoogleChrome/lighthouse

Use trace instead of protocol for lantern

Open
#16,805 0 comments 0 reactions 0 assignees View on GitHub
14.0
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 14h
Merged PRs (30d)
20

Description

See: #16026

ctrl+f `INTERNAL_LANTERN_USE_TRACE`

There are ~7 tests that produce different results when using the trace instead of the CDP network log. Each one needs to be investigated fully and understood. For the cases where the trace implementation has an error, we need to fix it (Lantern lives in [CDT repo now](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/models/trace/lantern/)).

[debugNormalizeRequests](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/models/trace/lantern/graph/PageDependencyGraph.ts;l=425) is critical for debugging the differences.

It's probably not necessary to treat this as a breaking change, but it seems like the safe approach.

Contributor guide

Open the contributing guide

Research direction

Start with issue #16026 and the INTERNAL_LANTERN_USE_TRACE references, then compare the roughly seven differing tests. Use debugNormalizeRequests in PageDependencyGraph.ts and inspect Lantern in the CDT repository to determine whether each difference is expected or an implementation error. Done means the trace path produces correct results for the investigated cases and the switch is safe to adopt.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.