GoogleChrome / GoogleChrome/lighthouse
no extension warning for chrome-extension runtime cost
- Dominant language
- JavaScript
- Stars
- 30.8k
- Forks
- 9.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 20
Description
From: https://social.ayco.io/@ayo/109625339833530015
If you install the [React Developer Tools extension](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en), you can end up with multiple entries from the extension in the unused javascript table.

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

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

Two issues:
- The opportunity savings look like they're overestimated. There's real impact (that 427kB script took 36ms to presumably load from SSD and cross processes on my machine, and from the user's screenshot there could be many more files loaded in some situations), but these files are being treated as [loading from network](https://github.com/GoogleChrome/lighthouse/blob/437eb4d757c52cd19994ccf80e91e872cf2f62c7/core/lib/dependency-graph/simulator/simulator.js#L292-L314) instead of from disk due to [`chrome-extension` not being included in `NON_NETWORK_SCHEMES`](https://github.com/GoogleChrome/lighthouse/blob/437eb4d757c52cd19994ccf80e91e872cf2f62c7/core/lib/url-utils.js#L16-L25). Seems like not an issue to add it to the set (I assume it's just been an oversight), but would need to double check other callers of `isNonNetworkProtocol`.
- Because this is just network activity with minimal js tasks (at least on my machine), you don't get an extension warning at the top of the report since the "Chrome extensions negatively affected this page's load performance" is based [just on extension-caused task length](https://github.com/GoogleChrome/lighthouse/blob/437eb4d757c52cd19994ccf80e91e872cf2f62c7/core/audits/bootup-time.js#L99-L100). It's possible these files don't have an enormous negative effect on page load, but if they're big enough to show up in the audit after fixing the non-network url handling, there should probably be a warning explaining things (maybe time to consider implementing [that TODO](https://github.com/GoogleChrome/lighthouse/blob/437eb4d757c52cd19994ccf80e91e872cf2f62c7/core/audits/bootup-time.js#L114))
cc @bramus
Contributor guide
Assessment
This issue has not been assessed yet.