Skip to content

Isolate lantern in preparation for moving to trace engine #15841

@connorjclark

Description

@connorjclark

doc 🔒

b/335099340

As a first step to bringing Lantern into the trace engine, we need to isolate it from any Lighthouse internals.

The end goal of this migration is to move all parts of Lantern into its own folder core/libs/lantern, and have Lighthouse import from a single entry module. During this process we'll ensure Lighthouse tests still pass, the migration can be done incrementally. When finished, Lantern will be totally isolated from Lighthouse and it should be fairly simple to move it into the trace engine.

Things we'll move as part of "Lantern":

  • core/lib/dependency-graph (simulator and graph)
  • LanternMetric and derived classes
  • Any related tests, including lantern database (but not smokes)

Some things need to be pulled into trace engine.

  • tbt-utils.js (as Helpers.tbt.*?)
  • Speedline

Things not moving:

  • core/lib/network-request.js (instead will just have a minimal interface for a network request inside Lantern)
  • Computed artifacts. Existing LanternMetric computed artifacts will just be a wrapper around the real thing from core/lib/lantern. Caching like that doesn't belong in Lantern as a library.
  • Similar treatment for the existing PageDependencyGraph computed artifact - that needs to move to Lantern folder, but we still want to use a computed artifact of it in Lighthouse
  • Simulated throttling metrics (metrics/lantern*) - RPP will not use simulated throttling, it will only use lantern models to get estimated savings

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions