Closed
Bug 825483
Opened 12 years ago
Closed 10 years ago
Reduce bfcache size on low memory devices
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox38 fixed)
RESOLVED
FIXED
Firefox 38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: wesj, Assigned: mfinkle, Mentored)
References
Details
Attachments
(1 file)
972 bytes,
patch
|
wesj
:
review+
|
Details | Diff | Splinter Review |
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.
[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/app/mobile.js#109
[2] http://mxr.mozilla.org/mozilla-central/source/docshell/shistory/src/nsSHistory.cpp#272
Assignee | ||
Comment 1•12 years ago
|
||
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" ?
Assignee | ||
Comment 2•11 years ago
|
||
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)
Reporter | ||
Comment 3•10 years ago
|
||
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)
Assignee | ||
Comment 4•10 years ago
|
||
Updating the links a bit:
The auto-calculate code where the 4MB estimate is shown:
http://hg.mozilla.org/mozilla-central/diff/9b2a99adc05e/docshell/shistory/src/nsSHistory.cpp
We already have code to evict all content viewers on a memory-pressure:
http://hg.mozilla.org/mozilla-central/diff/051b3d8ed545/docshell/shistory/src/nsSHistory.cpp
Let's use this bug to just set the pref to 0 for low memory devices, so they have less chances of OOMs.
Assignee | ||
Comment 5•10 years ago
|
||
Simple fix adds a session-default pref on low memory trigger.
Assignee: nobody → mark.finkle
Attachment #8560065 -
Flags: review?(wjohnston)
Reporter | ||
Updated•10 years ago
|
Attachment #8560065 -
Flags: review?(wjohnston) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•