If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Investigate tweaking bfache preferences on Android




Firefox for Android
8 months ago
7 months ago


(Reporter: JanH, Unassigned)


Firefox Tracking Flags

(Not tracked)




8 months ago
Since we decided to turn on the bfcache in bug 472368, browser.sessionhistory.max_entries has always remained at 1, meaning we store at most one entry into the bfache.

We should investigate whether we could finally safely increase that value, although I can't say either whether the automatic algorithm (enabled by setting that pref to -1, see https://hg.mozilla.org/mozilla-central/annotate/71224049c0b52ab190564d3ea0eab089a159a4cf/docshell/shistory/nsSHistory.cpp#l263) might or might not still be too optimistic for us, although I guess we could always decide to tweak it with an #ifdef ANDROID.

Our current browser.sessionhistory.contentViewerTimeout will also mean that bfcache entries will expire sooner than on desktop and on a memory pressure event we drop the bfcache completely anyway, which should protect us a bit against excessive memory usage, but we should probably still test first how much of an impact increasing that pref could have.

Speaking of memory pressure, we then disable the bfache for the remainder of the session until the app is restarted (https://dxr.mozilla.org/mozilla-central/rev/71224049c0b52ab190564d3ea0eab089a159a4cf/mobile/android/chrome/content/MemoryObserver.js#41) - maybe we should cautiously try re-enabling it when our internal memory pressure state decays back to 0 (we currently don't have a notification for that, though).


7 months ago
Duplicate of this bug: 749321
You need to log in before you can comment on or make changes to this bug.