GoogleChrome / lighthouse

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

no extension warning for chrome-extension runtime cost #14651

Open brendankenny opened 1 year ago

brendankenny commented 1 year ago

From: https://social.ayco.io/@ayo/109625339833530015

If you install the React Developer Tools extension, you can end up with multiple entries from the extension in the unused javascript table.

Lighthouse unused JavaScript audit result showing 'chrome-extension' urls loaded in the page

These are legitimate network entries, the extension really is injecting script tags into the page to load resources from the extension's files

Chrome script debugger showing script tag injection into the host page

And they show up in the network panel as well, even on non-react pages:

network waterfall for example.com showing a script loaded from

Two issues:

cc @bramus

paulirish commented 1 year ago

discussion: NON_NETWORK_SCHEMES seems like a win. feels like we can add it there and everything is great.

The "Chrome extensions negatively affected this page's load performance" message wont get triggered in this case but.. should? Is there something else that quantifies the runtime cost of loading these that we can use as signal?

paulirish commented 1 year ago

followup after #15022

The "Chrome extensions negatively affected this page's load performance" message wont get triggered in this case but.. should? Is there something else that quantifies the runtime cost of loading these that we can use as signal?

Ummmm

https://github.com/GoogleChrome/lighthouse/blob/f6171e018bd17977ad276cdaceb6765e927e7c6c/core/audits/bootup-time.js#L99-L100

We have something to do here.. LIke.. probably consider parseCompile time too..

But the more that @brendankenny and I look at https://github.com/GoogleChrome/lighthouse/blob/f6171e018bd17977ad276cdaceb6765e927e7c6c/core/audits/bootup-time.js#L82-L109 the less it makes sense. it was probably my fault? iunno.