Open Bug 1743485 Opened 2 years ago Updated 2 years ago

Warn user when a loading tab is taking too long due to WebExtension persistent listeners blocking it

Categories

(WebExtensions :: Frontend, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: mixedpuppy, Unassigned)

References

(Depends on 1 open bug)

Details

Bug 1734947 illustrates how design choices in an addon can severely impact our startup performance due to a blocking webrequest listener.

We should introduce some startup timeout for the persistent listeners and notify the user that an addon is taking too long and is blocking firefox startup.

Summary: Introduce timeout for persistent listeners → Warn user when a loading tab is taking too long due to WebExtension persistent listeners blocking it

notify the user that an addon is taking too long and is blocking firefox startup.

Would this include extensions which are merely waiting for a Firefox API to respond?

(In reply to rhill@raymondhill.net from comment #1)

notify the user that an addon is taking too long and is blocking firefox startup.

Would this include extensions which are merely waiting for a Firefox API to respond?

Yes, if it is delaying startup for a significant time.

Severity: -- → N/A
Priority: -- → P3

As pointed out in Bug 1741865 comment 40, there are different cases where a webpage load may taking too long because of an extension blocking a webrequest that we may need to consider and handle differently, e.g.:

  • the extension is keeping the Firefox process where extension runs so busy that it is unable to handle the WebExtensions API events that are blocking the webpage from loading
    • => this is something that may be more directly correlated with that particular extension
  • the extension is waiting on an API call that is taking too long
    • => this would be more directly correlated to a Firefox issue (that the extension may happen to make it more visible but not directly due to the extension itself, e.g. waiting on a storage.local API that is taking too long because of a QuotaManagerService initialization is taking too long)
  • the extension is not waiting on any API call, but never its webrequest blocking listener never resolves (e.g. because the extension may not be handling some errors gratefully and get into a state that will never make the extension to get to unblock the blocked webrequest)
    • => this may be a bit trickier than the first case (but it should be possible to distinguish it in a consistent way from the second one)

(In reply to Luca Greco [:rpl] [:luca] [:lgreco] from comment #3)

As pointed out in Bug 1741865 comment 40, there are different cases where a webpage load may taking too long because of an extension blocking a webrequest that we may need to consider and handle differently, e.g.:

To make matter more complicated, there could also be instances where an extension is waiting on a network-related API call, which could be delayed for all sorts of reasons without Firefox being at fault -- a case where the extension can be fairly blamed in my opinion (an extension waiting for a network-related API call to resolve before unblocking its webRequest listener seems like a bad idea).

You need to log in before you can comment on or make changes to this bug.