Closed Bug 1348805 Opened 9 years ago Closed 3 years ago

Session restore observes browser:purge-domain-data for every tab and then re-collects data for every tab indiscriminately

Categories

(Firefox :: Session Restore, enhancement)

enhancement

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Gijs, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fxperf:p3])

https://dxr.mozilla.org/mozilla-central/rev/1b9293be51637f841275541d8991314ca56561a5/browser/components/sessionstore/content/content-sessionStore.js#541 looks like it observes once for every tab, but then calls .collect() on itself irrespective of whether the purged domain (which I'm guessing is passed as the data param of the observer, but I could be wrong) matches the current tab in any way. Then there's also a global observer in SessionStore.jsm - https://dxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/SessionStore.jsm#737 . Really, the former observer doesn't seem to serve much of a purpose. It would be strictly more efficient if we just re-collected all the tab data in 1 go from the parent process when this happens, rather than observing the notification N + 2 (for sessionstore.jsm in parent+child process) times and then scheduling N setTimeout(..., 0)s that all send stuff up to the parent, which feels like a recipe for hanginess. Of course, ideally, we should be able to re-collect only the tabs affected by the domain purge, but that's probably harder because of iframes and scripts and cookies and whatnot...
Whiteboard: [fxperf]
Whiteboard: [fxperf] → [fxperf:p3]
Severity: normal → S3

This got fixed at some point - bug 1483440 refactored some of this, so I don't think this issue exists anymore.

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