Closed Bug 1712503 Opened 3 years ago Closed 2 years ago

throttle about:processes updates in background

Categories

(Toolkit :: Performance Monitoring, defect)

Firefox 90
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dennis.lissov, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0

Steps to reproduce:

Start Firefox Nightly on Linux with Fission. Open a lot of tabs from different domains (right now my Firefox has about 55 content processes running).
Open about:processes tab for some purpose. Switch to a different tab, leaving about:processes in the background.
Note the main process CPU consumption. Close the about:processes tab. Note the main process CPU consumption again.

Actual results:

With about:processes: main process CPU consumption 90-130%, laptop power consumption 12-13 W.
Without about:processes: main process CPU consumption 20-60%, laptop power consumption 15-16 W.

Expected results:

An about:processes tab that's in the background (possibly pinned) should have no significant effect on CPU consumption and battery life.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Content Processes' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: Content Processes
Product: Firefox → Core

I think there has been some optimizations to about:processes recently

Component: DOM: Content Processes → Performance Monitoring
Product: Core → Toolkit

I've tried profiling it in Nightly 2021-05-27 on Linux. With 37 content processes, the StreamTrans threads saw a GetProcInfo call every two seconds that took about 1.2 seconds, which amounted to about 60% CPU consumption (on one core).

Sorry, looks like I got the power consumption numbers in the comment 0 mixed up. The higher consumption was with about:processes, not without.

(In reply to Olli Pettay [:smaug] from comment #2)

I think there has been some optimizations to about:processes recently

When about:processes is in the background, we don't update the table, but the ChromeUtils.requestProcInfo call still gets made every 2s. In most cases that takes a very short time, and I optimized that part a bit (especially in bug 1665318 and bug 1744264).

If you still see GetProcInfo calls taking a long time, I would be interested in seeing the profile.

If you still see excessive CPU use from about:processes while it is in the background, feel free to reopen and I would be happy to look at a profile, but without more recent information, I'll assume this has been fixed by the various optimizations mentioned in the previous comments.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.