Closed Bug 792143 Opened 9 years ago Closed 9 years ago
[Native Fennec] Expire unused tabs
In the case where the user has many tabs opened, but has not used some of the tabs in a while, we should kill the tab and free the memory it is holding. Serializing the entire page is very tricky to do, but we should be able to kill the tab and use the session-restore code to bring it back if the user switches back to it.
We could use this for armv7 too. I think this is a memory requirement, not CPU requirement.
Assignee: nobody → bugmail.mozilla
I figured opening a new tab would be a good place to zombify an older tab because that's where we know we're going to need a bunch of memory. We could move this call elsewhere though. Also note that even with this code the zombieTime pref is still set to -1 so zombification will be off by default.
Attachment #670888 - Flags: review?(mark.finkle)
Comment on attachment 670885 [details] [diff] [review] Part (1/2) - Add an TabMruList object to maintain an MRU list of tabs I like the concept here. Every time I start to review the code, I want to change the structure though. A few things: 1. Make "TabMruList" become "Tabs", which manages the tabs. We'd extract a lot of code from BrowserApp. 2. Couldn't we just use Tab.lastTouch (as a Date) and just compare that when zombifying? #1 could wait for a refactor. What about #2? Do we need the mruIndex too?
Comment on attachment 670885 [details] [diff] [review] Part (1/2) - Add an TabMruList object to maintain an MRU list of tabs Yeah I was also thinking about how the mruIndex is pretty much useless since we can accomplish the same thing using just the timestamp. I'll redo these patches, I think I can make it much less bloated.
Attachment #670885 - Flags: review?(mark.finkle) → review-
Attachment #670888 - Flags: review?(mark.finkle) → review-
Updated as per comments
Rebased. Note that this still doesn't enable it by default since the zombieTime pref is -1
Comment on attachment 673257 [details] [diff] [review] (1/2) Maintain most recent use timestamps on tabs Nice
Attachment #673257 - Flags: review?(mark.finkle) → review+
Attachment #673258 - Flags: review?(mark.finkle) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
Is there no chance that user data (e.g. partially filled-in forms) will be lost? After all the previous discussion I've seen on this kind of thing, I'm surprised that two small patches is enough to make it work safely. How does this differ from bug 675539?
(In reply to Nicholas Nethercote [:njn] from comment #11) > Is there no chance that user data (e.g. partially filled-in forms) will be > lost? After all the previous discussion I've seen on this kind of thing, > I'm surprised that two small patches is enough to make it work safely. How > does this differ from bug 675539? Currently, Firefox Mobile session restore does not save off form data. Therefore, expired tabs would lose any partial form data the user filled. We could add that feature, or a minimal version of it. This bug is similar to bug 675539, but that patch is limited to desktop Firefox.
Summary: [ARMv6] Expire unused tabs → [Native Fennec] Expire unused tabs
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.