Prefer to unload tabs in collapsed tab groups when under RAM pressure
Categories
(Firefox :: Tabbed Browser, enhancement, P3)
Tracking
()
People
(Reporter: sthompson, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fidefe-tabgrps])
TabUnloader currently prioritizes which tabs to forcibly unload when the user's system is under RAM pressure https://searchfox.org/mozilla-central/source/browser/components/tabbrowser/TabUnloader.sys.mjs
We've had discussions about how tabs in collapsed tab groups should probably be unloaded before tabs outside of tab groups, all other things being equal. From those discussions, we generally agree that tabs in collapsed tab groups are less likely to be used again soon compared to ungrouped tabs. However, there is some belief that users might collapse a tab group in order to do some other work before returning to the tab group; in that scenario, we'd prefer to preserve the tab group's tabs over other ungrouped tabs. There is no simple way to predict the user's intentions here, so it's better to do what we think makes sense for most users: prefer to unload tabs in collapsed tab groups because they are not visible and the user is less likely to return to them when compared to ungrouped tabs.
Edited to remove the following:
Based on that logic, it would probably also make sense to unload hidden tabs before tabs in collapsed tab groups, all other things being equal.
We can do something like introduce visibility-based weights.
If the scope of TabUnloader expands in the future (e.g. by forcibly unloading tabs that require high CPU resources) then adding this visibility-based priority will help protect the user experience.
| Reporter | ||
Updated•9 months ago
|
Updated•9 months ago
|
Comment 1•9 months ago
|
||
(In reply to Stephen Thompson [:sthompson] from comment #0)
Based on that logic, it would probably also make sense to unload hidden tabs before tabs in collapsed tab groups, all other things being equal.
Not sure that all things are actually equal. We use a hidden tab for Firefox View for instance, and extensions can hide tabs for various reasons. We could still try it, but I'd suggest tackling that after this, in a separate bug.
| Reporter | ||
Updated•9 months ago
|
Perhaps you can optimize tab discarding by tracking and learning from users' visiting habits.
Description
•