Closed Bug 1725257 Opened 3 years ago Closed 3 years ago

Introduce about:unloads (chrome://discards equivalent)

Categories

(Firefox :: Tabbed Browser, enhancement)

enhancement

Tracking

()

VERIFIED FIXED
94 Branch
Tracking Status
relnote-firefox --- 94+
firefox93 --- wontfix
firefox94 --- verified
firefox95 --- verified

People

(Reporter: toshi, Assigned: toshi)

References

Details

Attachments

(4 files, 1 obsolete file)

We're reviving automatic tab unloader feature (bug 1587762). It might be useful to have a page like chrome://discards in Chrome, especially to see which tab will be unloaded next because the tab selection logic is complicated.

Attached image about-discards.png (obsolete) —

The patch includes the following updates:

  • getAllProcesses() adds a per-tab map to hold the processes backed by
    the process to a tab so that we don't need to iterateprocesses twice.

  • Consider a process that hosts multiple frames in a single tab as
    a unique process because such processes are terminated when
    that single tab is unloaded.

  • Add TabUnloader.isDiscardable()

Assignee: nobody → tkikuchi
Status: NEW → ASSIGNED

The page contains

  • a table to show the tabs and their attributes that TabUnloader considers
  • a button to trigger TabUnloader.unloadLeastRecentlyUsedTab()

to visualize the behavior of TabUnloader and manually trigger it.

Depends on D123987

Attachment #9238578 - Attachment is obsolete: true
Attached image about-discards-v2.png
Attachment #9238581 - Attachment description: Bug 1725257 - Part 2. Add a blank about:discards. r=NeilDeakin → Bug 1725257 - Part 2. Add a blank about:unloads. r=NeilDeakin
Attachment #9238582 - Attachment description: Bug 1725257 - Part 3. Implement about:discards. r=NeilDeakin → Bug 1725257 - Part 3. Implement about:unloads. r=NeilDeakin
Pushed by tkikuchi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/98586fa85ecf
Part 1. Optimize TabUnloader for about:discards.  r=NeilDeakin
https://hg.mozilla.org/integration/autoland/rev/061cbd7639c4
Part 2. Add a blank about:unloads.  r=NeilDeakin,flod
https://hg.mozilla.org/integration/autoland/rev/4e62d5d8f501
Part 3. Implement about:unloads.  r=NeilDeakin,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

Toshi, the feature itself landed in 93, is the new about:unloads page supposed to be uplifted in 93 as well or should it ride the 94 train. It probably should have a mention in our nightly release notes at least, wdyt?

Flags: needinfo?(tkikuchi)
Flags: needinfo?(tkikuchi)
Summary: Introduce chrome://discards equivalent → Introduce about:unloads (chrome://discards equivalent)

(In reply to Pascal Chevrel:pascalc from comment #10)

Toshi, the feature itself landed in 93, is the new about:unloads page supposed to be uplifted in 93 as well or should it ride the 94 train. It probably should have a mention in our nightly release notes at least, wdyt?

Thank you for suggesting it! Given the complexity of this change, let's keep this on the 94 train. Instead, I'd like to publish a new release note. Below is the request template.

Release Note Request (optional, but appreciated)
[Why is this notable]: The new page about:unloads gives users the ability to manually trigger tab unloading at any time. In addition to the tab unloading feature, which was introduced in v93, we think it's useful to users and worth advertising as a release note.
[Affects Firefox for Android]: No
[Suggested wording]: Firefox now offers a new page about:unloads where users can manually unload tabs without closing them to release the system resource.
[Links (documentation, blog post, etc)]: No

Thanks, note added to our Nightly release notes.

Added to the Beta94 relnotes also.

See Also: → 1733704
Flags: qe-verify+

I have started verifying this issue using the latest Firefox Nightly 95.0a1 (Build ID: 20211012214032) and Firefox Beta 94.0b5 (Build ID: 20211012185633) on Windows 10 x64, macOS 11.5.1 and Ubuntu 20.04.

  • The “about:unloads” page is correctly displayed.
  • The tab with the highest priority is unloaded after clicking the “Unload” button from the page. Also, it is no longer shown on the “about:unloads” page until this tab is reloaded.

@Toshihito could you please let us know if there are other scenarios that we should verify for this patch?

Flags: needinfo?(tkikuchi)

(In reply to Simona Rosu [:srosu], Ecosystem QA from comment #14)

@Toshihito could you please let us know if there are other scenarios that we should verify for this patch?

Thank you for verifying the page! Here's one more scenario worth verifying.

  • Keep clicking the button and verify the button becomes unclickable when there are no unloadable tabs (= when Priority of all tabs shown is "-").
Flags: needinfo?(tkikuchi) → needinfo?(srosu)

@Toshihito, I’ve just verified the scenario that you mentioned above and I’ve noticed the following:

  • The “Unload” button becomes unclickable when the priority of all the tabs displayed on the page is blank.
  • Also, I’ve noticed that if some of the “about:” pages are displayed on the page, and their priority is not blank, then the “Unload” button is still clickable and the about: pages are not unloaded when clicking this button.
    Please let us known if you think that we should log an issue for this behavior.
Flags: needinfo?(srosu) → needinfo?(tkikuchi)

(In reply to Simona Rosu [:srosu], Ecosystem QA from comment #16)

  • Also, I’ve noticed that if some of the “about:” pages are displayed on the page, and their priority is not blank, then the “Unload” button is still clickable and the about: pages are not unloaded when clicking this button.
    Please let us known if you think that we should log an issue for this behavior.

Ah, yes, it's expected that tabs hosted by the main process have valid priorities but not unloadable. It's ok to leave it. Thank you for bringing it up.

Flags: needinfo?(tkikuchi)

@Toshihito, thank you for providing more details. Based on comment 14 and comment 17, I’m marking this issue as Verified Fixed.

Status: RESOLVED → VERIFIED
Flags: qe-verify+ → qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: