Open Bug 1444222 Opened 2 years ago Updated 2 years ago

Consider using idleservice when deciding when or how long to wait to store sessiondata in Fennec

Categories

(Firefox for Android :: Session Restore, enhancement, P5)

All
Android
enhancement

Tracking

()

People

(Reporter: jesup, Unassigned)

References

Details

Desktop uses the idleservice to adjust how long it will wait to save sessiondata (especially form data); we should consider if this makes sense for Fennec.
Did you really mean the idle service, or rather requestIdleCallback? Data *collection* on desktop uses the latter, see https://dxr.mozilla.org/mozilla-central/rev/f1965cf7425fe422c9e9c78018f11b97e0a0f229/browser/components/sessionstore/content/content-sessionStore.js#823-869

P3 for now, since the really big win was probably bug 1443765 and I'm a bit hesitant to stretch the delay *much* further, since
- at the moment data collection is completely decoupled from further usage of that data, so if we wait too long, we increase the risk of ending up using outdated data
- and at the same time we rely on the session store data somewhat more often than desktop: not just to recover from crashes or controlled shutdowns, but also from the OS simply killing us [1] or to restore background tabs that we unloaded in response to a memory pressure event


[1] either the low memory killer, although most of the time that should only happen when we're already in background, or else e.g. the user swiping us away from the task switcher
Priority: -- → P3
Hardware: Unspecified → All
Conversely if we e.g. ended up actually starting to use something like Desktop's content-sessionStore.js (which would more or less take care of this bug), *and* made it so that before unloading ("zombifying") a tab or when flushing pending state to disk we first processed any outstanding data collection actions from the affected tabs' MessageQueues, so as to have the most up-to-date data in those cases, I'd feel a lot less queasy about this.
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.