Closed
Bug 808293
Opened 12 years ago
Closed 12 years ago
Firefox should unload background tabs to save memory
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 675539
People
(Reporter: kats, Unassigned)
Details
(Whiteboard: [MemShrink])
As of bug 803575, Fennec will unload background tabs in low-mem situations to free up some memory. Switching back to an unloaded tab will re-load it. On the blog post describing this feature [1], somebody suggested doing this for desktop FF as well [2]. Sounds like a reasonable idea to me, although obviously the heuristics driving it should be different. Maybe let this idea simmer for a while until we see how the Fennec implementation does?
[1] https://staktrace.com/spout/entry.php?id=782
[2] https://staktrace.com/spout/entry.php?id=782#c1246
Comment 1•12 years ago
|
||
Bugzilla's search sucks, bug Google finds the dupe easily.
https://www.google.com/search?q=site%3Abugzilla.mozilla.org+unload+tabs
(Note that this is a minefield. I'm surprised you guys were able to do it on Fennec without opposition!)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
![]() |
||
Comment 2•12 years ago
|
||
> (Note that this is a minefield. I'm surprised you guys were able to do it
> on Fennec without opposition!)
Yeah, I'm also surprised by this. Maybe there's less of an expectation on mobile that data will never be lost, because mobile browsing is somehow seen as more transient?
Comment 3•12 years ago
|
||
Yeah, but I recall getting very strong pushback from mobile folks against the idea that Fennec should ever unload a tab (even a background tab) when going into the background.
See e.g. bug 757918.
Anyway, hats off to you for getting this in.
![]() |
||
Comment 4•12 years ago
|
||
> Anyway, hats off to you for getting this in.
Maybe people just didn't notice... we'll see if there are complaints during Aurora/Beta.
Reporter | ||
Comment 5•12 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #2)
> Maybe there's less of an expectation on
> mobile that data will never be lost, because mobile browsing is somehow seen
> as more transient?
I think this is true. In particular, Android will not hesitate to kill Fennec when Fennec is in the background and it needs more memory. So even if we don't do this, the "user contract" (stealing jlebar's term from [1]) has already been broken. Therefore breaking it a little bit more isn't as much of big deal.
(In reply to Justin Lebar [:jlebar] from comment #3)
> Yeah, but I recall getting very strong pushback from mobile folks against
> the idea that Fennec should ever unload a tab (even a background tab) when
> going into the background.
Note that even with the new changes, we don't unload tabs when Fennec is put into the background. We will unload tabs if we get a memory pressure event, regardless of whether Fennec is in the foreground or background. I agree with :mfinkle in that we shouldn't just unload tabs when we go into the background, because there are valid use cases (e.g. the user is multitasking and switching rapidly between apps) where unloading tabs will be very visible and very bad UX.
Slightly off topic - I'm not sure if you watched the pancake post-mortem presentation last week, but it was interesting to note that one of the main reasons people leave so many tabs open is because there's no other way to deal with them that lines up with the mental model they have (they generally want to throw it into a temporary reading list or save it for later in some way). Solving that problem better might reduce the number of tabs people keep lying around, and make bug 675539 a moot point.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=757918#c5
You need to log in
before you can comment on or make changes to this bug.
Description
•