Closed
Bug 1102500
Opened 10 years ago
Closed 7 years ago
Web of Trust (WOT)'s mutation-observer-triggered page scans cause painful jank, with large frequently-updating web pages
Categories
(WebExtensions :: General, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: dholbert, Unassigned)
References
Details
tl;dr: Web of Trust and Facebook do not play well together; after a Facebook tab has grown large enough, Web of Trust ends up making Firefox subtly-janky to completely-unusable (not to mention burning CPU / battery).
Longer description:
As described in bug 1101182 comment 12, if you have the Web of Trust addon and you have a Facebook tab open, you'll end up getting callbacks into Web of Trust's "wot_search.process()" function every ~2 seconds. And that function's runtime can grow (for Facebook at least) to > 100ms if you scroll to dynamically load a long facebook timeline. (or if you let Facebook pull in more content, over the course of a day) Note that Facebook's every-two-second updates don't seem particularly expensive themselves; it's the "wot_search.process()" which gets really expensive. (particularly given that it's every 2 seconds).
This makes Firefox pretty unusable. (It's much worse with the regression described in bug 1101182 -- but it's still bad even without that.)
SUGGESTED ACTION:
This could be addressed by modifying WoT's behavior. Here are some ideas that would *vastly* improve things here:
(A) To prevent jank from wot_search.process() in background tabs: unregister WOT's mutation observers for content in background tabs (so that we won't jank every 2 seconds if you have e.g. Facebook in a background tab). Instead, just re-scan those pages when they're foregrounded.
(B) To prevent jank from wot_search.process() in foreground tabs: make the "process()" function (or its most expensive sub-step) keep track of how long it's taking, and bail out if the function takes longer than e.g. 50ms, since it's blocking the UI and we don't want to block the UI forever. Then, schedule an asynchronous callback to resume where it left off. And cancel the async callback if we get another process() call before it fires, e.g. if the page dynamically changes.)
And a more-complicated idea (not sure if it's feasible):
(C) On page mutations, only scan the changed content. (In e.g. Facebook's case, it seems like the every-2-second mutations rarely make visible changes to the page -- but they trigger a full re-scan by WOT.)
Even if the WOT team can't do (C), I'd highly recommend that they do (A), and ideally also (B).
Comment 1•7 years ago
|
||
Mass-closing bugs that relate to legacy versions of add-ons or are otherwise no longer worth tracking. Please comment if you think this bug should be reopened.
Sorry for the bugspam. Made you look, though!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•6 years ago
|
Component: Add-ons → General
Product: Tech Evangelism → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•