Closed Bug 825483 Opened 10 years ago Closed 8 years ago

Reduce bfcache size on low memory devices


(Firefox for Android Graveyard :: General, defect)

Not set


(firefox38 fixed)

Firefox 38
Tracking Status
firefox38 --- fixed


(Reporter: wesj, Assigned: mfinkle, Mentored)




(1 file)

We currently hardcode our bfcache to 1 page (for each tab I think?) [1]. We could lower it on low memory devices. The dynamic calculation in Firefox guesses about 4MB per entry [2], so it could be a 4MB per tab win. Alternatively, we could fix the dynamic calculation to be a bit more conservative and turn it on everywhere.

I'd like to better understand the difference between "max_entries" and "max_total_viewers". Reducing "max_total_viewers" means setting it to zero, which means turning it off. How does that affect bfcache? Would reducing "max_entries" be a simpler change that does not completely turn off bfcache? How much memory is reduced by changing "max_entries" ?
Can we get someone to make some settings changes, then run about:memory (or dump it using the intent) to compare the differences? If we can see some noticeable wins, these would be easy preferences to adjust dynamically in response to memory limits.

Wesj - Maybe ckitching would be able to do this?
Flags: needinfo?(wjohnston)
Argh. Forgot this. If a volunteer wants to look at about:memory a bit, I'd be happy to help you.
Mentor: wjohnston
Flags: needinfo?(wjohnston)
Updating the links a bit:

The auto-calculate code where the 4MB estimate is shown:

We already have code to evict all content viewers on a memory-pressure:

Let's use this bug to just set the pref to 0 for low memory devices, so they have less chances of OOMs.
Simple fix adds a session-default pref on low memory trigger.
Assignee: nobody → mark.finkle
Attachment #8560065 - Flags: review?(wjohnston)
Attachment #8560065 - Flags: review?(wjohnston) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.