Open
Description
Background
Browsers sometimes display a warning to the user that one of the browser extensions that they have enabled is slowing down their experience. Browsers seem to trigger such warnings under different circumstances, and there doesn't appear to be much documentation around this, or ways for extension developers to diagnose the performance issues. It would be nice to support extension developers in proactively improving their extension's performance.
Suggestion
- Provide some way of reporting performance issues to extension developers in an actionable way. For example, perhaps an event could be fired that included at least some details (e.g. a stack trace) of the slow extension code? I realise this would need to be balanced with user privacy however.
- I believe that so far, Firefox will warn the users if a content script is extremely slow (and the user tries to interact with the page), whereas Chrome will warn the user if a background script (in particular inside a blocking
onBeforeRequest
event handler) is slow. Perhaps the event could also include a description (e.g. "Slow content script", or "Slow onBeforeRequest handler") to point developers in the right direction?
References
- https://searchfox.org/mozilla-central/source/dom/ipc/ProcessHangMonitor.cpp#63-86
"EXTENSION NAME" is slowing down Firefox. To speed up your browser, stop that extension. Learn more <Stop>
- https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/warning_set.cc;l=71-80;bpv=1;bpt=1
This extension is slowing down Google Chrome. You should disable it to restore Google Chrome's performance.