Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate lantern in preparation for moving to trace engine #15841

Closed
connorjclark opened this issue Feb 28, 2024 · 1 comment
Closed

Isolate lantern in preparation for moving to trace engine #15841

connorjclark opened this issue Feb 28, 2024 · 1 comment
Assignees
Labels

Comments

@connorjclark
Copy link
Collaborator

connorjclark commented Feb 28, 2024

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
@connorjclark connorjclark self-assigned this Feb 28, 2024
@connorjclark
Copy link
Collaborator Author

All done with this step :)

copybara-service bot pushed a commit to ChromeDevTools/devtools-frontend that referenced this issue Jun 27, 2024
This is the culmination of isolating Lighthouse's Lantern library
(GoogleChrome/lighthouse#15841). The code in
this CL took Lantern as it now exists in Lighthouse, converted to
TypeScript, integrated its unit tests (Jest -> Karma conversion), and
resolved the majority of CDT's JavaScript linter errors.

There is no behavior change to CDT with this CL, besides TraceModel
exporting the Lantern module.

There is some refactoring work remaining, captured by
crbug.com/348449529

Bug: 335099340
Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5635855
Reviewed-by: Paul Irish <[email protected]>
Reviewed-by: Andres Olivares <[email protected]>
Commit-Queue: Connor Clark <[email protected]>
paulirish pushed a commit to paulirish/devtools-frontend that referenced this issue Jul 14, 2024
This is the culmination of isolating Lighthouse's Lantern library
(GoogleChrome/lighthouse#15841). The code in
this CL took Lantern as it now exists in Lighthouse, converted to
TypeScript, integrated its unit tests (Jest -> Karma conversion), and
resolved the majority of CDT's JavaScript linter errors.

There is no behavior change to CDT with this CL, besides TraceModel
exporting the Lantern module.

There is some refactoring work remaining, captured by
crbug.com/348449529

Bug: 335099340
Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
paulirish pushed a commit to paulirish/devtools-frontend that referenced this issue Jul 14, 2024
This is the culmination of isolating Lighthouse's Lantern library
(GoogleChrome/lighthouse#15841). The code in
this CL took Lantern as it now exists in Lighthouse, converted to
TypeScript, integrated its unit tests (Jest -> Karma conversion), and
resolved the majority of CDT's JavaScript linter errors.

There is no behavior change to CDT with this CL, besides TraceModel
exporting the Lantern module.

A handful of eslint checks have been disabled for this folder.

Bug: 335099340
Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant