Closed Bug 1729911 Opened 3 years ago Closed 3 years ago

Define a minimum unused period to unload a tab

Categories

(Firefox :: Tabbed Browser, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: toshi, Assigned: toshi)

References

Details

Attachments

(3 files)

TabUnloader chooses a tab to unload primarily based on tab's last accessed time. If the last accessed time is the oldest, the corresponding tab is chosen even though it was accessed just a few seconds ago. This may cause unwanted tab unloading. To mitigate the risk, we may define a minimum unused period (hardcoded or as a pref).

The chart above shows "How long unloaded tabs had been unloaded since they were unloaded", where the 25th percentile 60.22, meaning 25% of unloaded tabs were reloaded within a minute seems a bit short. Hopefully this patch, not to unload tabs that were accessed very recently, will improve tab selection.

Tab unloading should not unload "fresh" tabs i.e. tabs that were accessed
very recently, even though one of them was the least recently used tab.

To achieve it, this patch introduces the minimum inactive duration and we
prevent tabs that were accessed in the last period of that duration from
being unloaded.

This patch sets the default value to 10 minutes based on the historgram
TAB_UNLOAD_TO_RELOAD where the median was 60sec and the 75th percentile
was 1040sec. This value can be overriden by the parameter of the TabUnloader's
APIs so that about:unloads and the tests can unload those fresh tabs.

Attachment #9241556 - Attachment description: Bug 1729911 - Introduce TabUnloader._minInactiveDurationInMS not to unload fresh tabs. r=Neil → Bug 1729911 - Define minInactiveDurationInMS not to unload fresh tabs. r=Neil
Pushed by tkikuchi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8979a86f150d
Define minInactiveDurationInMS not to unload fresh tabs.  r=NeilDeakin
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
See Also: → 1737860

TAB_UNLOAD_TO_RELOAD has been improved. The median moved from 250.95sec (beta93) to 945.18sec (beta95)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: