Closed
Bug 803575
Opened 13 years ago
Closed 13 years ago
[Native Fennec] Expire tabs based on LRU and age
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 19
People
(Reporter: kats, Assigned: kats)
References
Details
(Whiteboard: [MemShrink])
Attachments
(1 file, 1 obsolete file)
5.68 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
We need to figure out if/when to turn on the tab expiration added in bug 792143. Some possible options:
1) Pref it on for all ARMv6 builds at compile-time
2) Pref it on for low-memory devices at run-time (assuming bug 801818 is fixed)
3) Wait until we hit a low-memory situation at runtime and then turn it on
4) Some combination of the above
5) Other?
Comment 1•13 years ago
|
||
my preference would be for #3. I think taras would prefer having it on all the time (for battery consumption rather than memory), CC'ing him.
Comment 2•13 years ago
|
||
(In reply to Brad Lassey [:blassey] from comment #1)
> my preference would be for #3. I think taras would prefer having it on all
> the time (for battery consumption rather than memory), CC'ing him.
I think #3 is a good start, can investigate more aggressive approaches once #3 lands.
Comment 3•13 years ago
|
||
Agreed that #3 is a good start. It would be nice if we could make this a session-only pref. I mean, each time we'd start a new Firefox, we'd start _not_ expiring tabs. We could do that by setting the "default branch" version of the preference:
let defaults = Services.prefs.getDefaultBranch();
defaults.setIntPref(...);
Such a pref value is only retained while Firefox is running and is reset to the real default value upon restart.
Food for thought.
Assignee | ||
Comment 4•13 years ago
|
||
Was discussing this with Brad today, and I want to clarify the existing behaviour and exactly what this bug is for.
Currently:
1) we unconditionally zombify all background tabs when we get a memory-pressure event (this was added in bug 784040)
2) time-based tab zombification (added in bug 792143) is completely disabled
"Time-based tab zombification", if enabled, will trigger zombification of a zero or one tabs when a new tab is opened. The tab that is zombified is the least-recently-used tab, if and only if the tab hasn't been used for browser.tabs.zombieTime seconds.
This bug is about when to enable "time-based tab zombification". My preference is to turn it on by default for low-memory devices, and to turn it on after receiving the first memory-pressure event on high-memory devices. I can add another boolean check or pref control exactly when the behaviour is enabled, if needed (or I could try to do it using the "default branch" of the pref as mark suggested).
Assignee | ||
Comment 5•13 years ago
|
||
This patch (1) assumes that my patch from bug 801818 is in the tree and (2) calls the new behaviour "pre-emptive zombies" because i suck at coming up with good names for things. Suggestions welcome, but I'll wait on requesting review until bug 801818 is actually landed.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → bugmail.mozilla
Comment 6•13 years ago
|
||
You could refer to this action as "tab expiration" (you filed it that way) and use:
Tabs._enablePreemptiveZombies -> Tabs._enableExpiration
browser.tabs.zombieTime -> browser.tabs.expirationTime
I'm fine with zombies too, so up to you :)
Assignee | ||
Comment 7•13 years ago
|
||
Attachment #674830 -
Attachment is obsolete: true
Attachment #677088 -
Flags: review?(mark.finkle)
Comment 8•13 years ago
|
||
Comment on attachment 677088 [details] [diff] [review]
Patch (v2)
Looks like a good start. Would telemetry probes for expiring tabs be useful to help us see how often the code is executing?
Attachment #677088 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #8)
> Looks like a good start. Would telemetry probes for expiring tabs be useful
> to help us see how often the code is executing?
Good call, I've filed bug 808003 as a follow-up for that.
Assignee | ||
Comment 10•13 years ago
|
||
Comment 11•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
![]() |
||
Updated•13 years ago
|
Whiteboard: [MemShrink]
Updated•13 years ago
|
Summary: Turn on tab expiration → [Native Fennec] Expire tabs based on LRU and age
Updated•5 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
•