Closed Bug 1630994 Opened 5 years ago Closed 5 years ago

Decentraleyes adds one webRequest listener per tab, overwhelms request filtering in the main process

Categories

(WebExtensions :: Developer Outreach, task, P3)

task

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zombie, Unassigned)

References

Details

+++ This bug was initially created as a clone of Bug #1630737 +++

Originally reported here: https://www.reddit.com/r/firefox/comments/g2dett/firefox_75_slow_with_many_tabs_browser_issue_or/fnld9h7/

Here's a profile: https://perfht.ml/3a8E264

Here's the list of add-ons the user reports having:

    Privacy Badger
    ClearURLs
    FoxyTab
    Dark Background and Light Text
    Decentraleyes

Maybe related, see: https://gitlab.com/KevinRoebert/ClearUrls/-/issues/455

Specifically these STR:

Create new Firefox profile
Install the following addons (ClearUrls, Decentraleyes, Dark Background and Light Text, and Privacy Badger)
Hold Ctrl+T until 500+ new tabs are created. 
Visit Amazon.com & immediately try scrolling around, page will freeze/stutter for several seconds.
Disable/Remove any one of these four addons (ClearUrls, Decentraleyes, Privacy Badge, or Dark Background)
Visit/Refresh Amazon page again, scrolling will be smooth, no initial freeze/stutter.

and

Firefox option > General > Restore previous session
Exit Firefox
Relaunch Firefox to have all 500 tabs in suspended/unloaded state
Visit Amazon.com, page still freeze/stutter scrolling  for first few seconds.

This bug is specifically about reaching out to Decentraleyes authors, which should be doable since that's a recommended extension.
https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/

(In reply to Andrew Swan [:aswan] from bug 1630737 comment #5)

Why is that a problem? Because decentraleyes adds a new onBeforeRequest listener for every tab that exists!! (https://git.synz.io/Synzvato/decentraleyes/-/blob/master/core/state-manager.js#L138-159).

  • reach out to decentraleyes author and suggest reorganizing to use a single listener with dispatching code in the extension rather than creating a listener per tab

Hey Thomas, could you please take a look at this. Let me know if you have any questions or need any help!

Summary: Main-thread in the parent process blocked while viewing Amazon when using several recommended add-ons from AMO → Decentraleyes adds one webRequest listener per tab, overwhelms request filtering in the main process

(In reply to Tomislav Jovanovic :zombie from comment #2)

Hey Thomas, could you please take a look at this. Let me know if you have any questions or need any help!

Did you mean to needinfo someone?

(Clearing perf whiteboard tags as this bug is about the add-on issue.)

Flags: needinfo?(tomica)
Whiteboard: [qf][fxperf]

I couldn't find Thomas on bugzilla, so I opened this bug for tracking and emailed him.

But apparently he has an account, so I'll also ni? here.

Flags: needinfo?(tomica) → needinfo?(synzvato)
See Also: → 1638007

I intend to fix the underlying Firefox issue in bug 1638007.

Depends on: 1638007
Flags: needinfo?(synzvato)
Severity: -- → S2
Priority: -- → P3

S1 or S2 bugs need an assignee - could you find someone for this bug?

Flags: needinfo?(mixedpuppy)

This bug remains to validate the fix with external extensions.

Severity: S2 → S3
Type: defect → task
Flags: needinfo?(mixedpuppy)

This issue should be resolved with bug 1631933 and bug 1638007, which is now in Firefox Beta (78).
Is there anyone on this bug who can verify that Firefox Beta performs better? Or do we need to ask QA?

Firefox 78 is going to be released next week, with the above fixes. I don't see us doing any more work here, so I'll close the bug.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.