Open Bug 1718014 Opened 4 years ago Updated 7 months ago

Show CPU/memory used by each tab and extension in about:processes

Categories

(Core :: DOM: Content Processes, enhancement, P5)

Firefox 91
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: housee, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

About:processes shows CPU/memory usage per process but it doesn't show the CPU/memory used by each tab and extension. This is problematic when a process is not enough to identify problems of high CPU/Memory usage. For extensions especially this is becomes hard to quickly see which extension is using a lot of CPU/Memory as they are all shown as one process.

Expected results:

Show CPU/memory used by each tab and extension in about:processes for easier identification of problematic tabs/extensions. Chrome is able to do this and it would be useful if Firefox could too.

Severity: -- → N/A
Priority: -- → P5
Duplicate of this bug: 1848241

Chrome can show a per-extension breakdown because every extension is hosted in a separate process.

In Firefox all extensions share one process, so it's difficult to offer a per-extension breakdown. For more details, see the discussion in bug 1848241.

Duplicate of this bug: 1854956

Is there a reason it was never added back after removing it with 'about:performance'?

It seems Firefox doesn't create separate process per extension based on the other ticket. Any specific technical limitations for 1 process per extension?
Also if it is true, how was it working in about:performance?

Is there a tracker or regression bug ticket created associated with it?

Note: I am bumping this as I currently have some extension abusing all available CPU on a website. There doesn't seems to be any documented way to narrow down to specific extensions except disabling one by one.

Flags: needinfo?(aiunusov)

(In reply to [:anutrix] from comment #4)

Is there a reason it was never added back after removing it with 'about:performance'?

Yes, the way it worked in about:performance caused significant overhead, and was unreliable to the point of being misleading (frozen processes taking a 100% CPU would not be shown because they would not send the data back to the parent process).

Any specific technical limitations for 1 process per extension?

I don't know the answer, that would be a question for people working on webextensions, but if I made a guess I would say we haven't felt the need to isolate these processes (process isolation for tabs was largely done for security reasons).

Also if it is true, how was it working in about:performance?

Each process was accumulating performance data in counters, and sending it back to the parent process so about:performance could display it.
In about:processes, all the data is collected from the parent process without IPC going back and forth between the parent and child processes.

Note: I am bumping this as I currently have some extension abusing all available CPU on a website. There doesn't seems to be any documented way to narrow down to specific extensions except disabling one by one.

The way to narrow it down is to capture a profile of what the process does, and then look at the activity in that profile. about:processes as a profiler icon on each process line to make it easy (just 1 click!) to capture a profile of what the entire process does. If you need help to understand what's in the profile, you can ask in the #joy-of-profiling matrix channel.

Thx. All that makes sense.

process isolation for tabs was largely done for security reasons

A similar thing for extension also makes sense to me as there many password manager extensions that would be better protected from other extensions. I know that ideally one should install unsafe extensions but better safety if possible would be nice.

The way to narrow it down is to capture a profile of what the process does, and then look at the activity in that profile. about:processes as a profiler icon on each process line to make it easy (just 1 click!) to capture a profile of what the entire process does. If you need help to understand what's in the profile, you can ask in the #joy-of-profiling matrix channel.

I did use the profiler to try and narrow down the issue but it seemed way too lower level than I could match to an extension. Eventually had to disable extension in bisection way.
I will check out #joy-of-profiling. Thx again.

Flags: needinfo?(aiunusov)
You need to log in before you can comment on or make changes to this bug.