GoogleChrome / lighthouse

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

Lighthouse for Firefox? #6032

Closed ExE-Boss closed 3 years ago

ExE-Boss commented 5 years ago

Firefox has one of the most powerful Developer Tools I have ever known (they also don’t track my every move, unlike a certain other more popular browser).

Lighthouse provides a great overview of what is needed for improving the load time and performance of a web application and I’d like to be able to access it from within Firefox.

Lighthouse already provides an extension for Google Chrome, which can be ported to Firefox with little effort.

wardpeet commented 5 years ago

Sadly it's not so simple. Lighthouse is using the chrome devtools protocol for doing everything. If we would port it to firefox we have to convert all of these calls to support firefox devtools protocol. We aren't even sure that all metrics we need are exposed by firefox. It's something we won't do in the near future.

I guess your stuck with chrome for now.

justinribeiro commented 5 years ago

To briefly expand on what @wardpeet said, there is work to be done on the protocol side before that could become a reality not just in Firefox, but potentially other browsers as well. There are efforts ongoing (WICG/devtools-protocol, conversation at Mozilla, and EDP), but it's early-days for many of those efforts and not likely to land any time soon.

brendankenny commented 5 years ago

Yeah, the protocol is what we're missing here. See the compatibility chart to get an idea of the different implemented features per browser. A big one we need is tracing, which is possible will never see cross-browser support due to how any trace format ends up tied to specific browser architecture.

Lighthouse already provides an extension for Google Chrome, which can be ported to Firefox with little effort.

Lighthouse mostly uses the chrome.debugger extension API to make the extension work. I don't believe that's part of the WebExtensions API yet, but even when/if it is, it's just used to pass protocol messages which largely don't work cross browser.

See #2406 for more. I'm going to close this issue in favor of that older one.

hikeislife commented 5 years ago

I'm commenting this just to encourage work on this. this tool would be great addition to firefox dev tools. I'd love to offer my help, but let's be real, I'm no where near knowledgeable enough to be capable of helping :grin:

ExE-Boss commented 4 years ago

@brendankenny https://github.com/GoogleChrome/lighthouse/issues/2406 has been changed to only be about Lighthouse for Chromium Edge.

connorjclark commented 4 years ago

Would Lighthouse for Firefox be useful even without the Performance category? :+1: / :-1: me.

connorjclark commented 4 years ago

For those answering yes: why? We expect the results to be the same for non-perf audits - the signals we check, AFAIK, are universal across browsers. Curious to hear what value it would bring you. From my understanding the only benefit would be from the Performance category (in other words, expect no difference in other categories in a "universal" Lighthouse). Supporting the other categories would be a lot of protocol work for no perceivable value.

Besides the browser protocol (which perhaps the latest Puppeteer work has enabled, I haven't tracked that. maybe @mathiasbynens can illuminate), tracing is the other big technical feat here. I don't have any knowledge on how Firefox or its tracing works, and I suspect the same is true for all other Lighthouse core members. If we decided to move in this direction, we would require much FF expertise. If you have the domain knowledge and are interested ... drop us a line.

patrickhulce commented 4 years ago

tracing is the other big technical feat here. I don't have any knowledge on how Firefox or its tracing works, and I suspect the same is true for all other Lighthouse core members

FWIW for Firefox-knowledgeable folks, we don't need complete support of the tracing category but some equivalent ability to learn about all time + duration of toplevel tasks (easy) and their relationships to each other and other network requests (hard).

justinribeiro commented 4 years ago

I won't lay claim to understanding all the internals in Firefox, but I have a doc from mid-last year during some exploration of some perf problems in FF. Let me see if I can extract some of that into something less case-specific (since that was client work) that might be of use.

thet commented 4 years ago

What about this addon: https://addons.mozilla.org/en-US/firefox/addon/google-lighthouse/ Is it an official Google Addon?

patrickhulce commented 4 years ago

@thet yes that was just released by @connorjclark and will be maintained by the team 🎉

Note that it uses the PSI API under the hood and will not be able to audit localhost/private sites.

patrickhulce commented 3 years ago

This was implemented in the form of the Firefox Browser Extension

BojanKogoj commented 1 month ago

This Firefox extension is not what we want and need, we need ability to analyze localhost. I understand there are many technical difficulties, but I don't believe this should be marked as completed.

connorjclark commented 1 month ago

It's not planned and that won't be changing, sorry.