Open Bug 1880744 Opened 8 months ago Updated 11 days ago

Leaving devtools (netmonitor) open in a background tab janks the parent process main thread

Categories

(DevTools :: Netmonitor, defect, P3)

defect

Tracking

(Performance Impact:low)

Performance Impact low

People

(Reporter: florian, Unassigned)

References

(Depends on 3 open bugs, Blocks 1 open bug)

Details

(Keywords: perf:animation, perf:responsiveness)

Attachments

(1 obsolete file)

Here's a profile: https://share.firefox.dev/3SLJcgw

Steps to reproduce:

  • I left devtools open on the netmonitor tab for the entire night on a web page that updates itself using a XHR every second (a bit more than 13,000 XHR requests over the night)

Expected result:
No consequence on browser responsiveness.

Actual result:
The entire browser is slow. I noticed because attempting to make a selection in the profiler was janky (mouse events are not dispatched smoothly to the content process). The parent process main thread is using a 100% of a CPU core.
Profiling shows that this is the netmonitor doing JS work and causing long reflows.
I think this should be faster in general (I think there are already bugs covering switching the netmonitor to a virtual list) and avoided entirely when devtools is not on screen (docked inside a background tab).

Thanks for filing! This on our roadmap as part of our work for performance this year.

Severity: -- → S3
Priority: -- → P3
Attachment #9386873 - Attachment is obsolete: true

The Performance Impact Calculator has determined this bug's performance impact to be low. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.

Platforms: [x] Windows [x] macOS [x] Linux
Impact on browser: Causes noticeable jank
Configuration: Rare
[x] Affects animation smoothness

Performance Impact: ? → low

Nicolas, is this a bit of a dupe of what we're seeing in bug 1896461? I.e., if the visibilityChange notifications were working as intended, would we still be seeing this?

Flags: needinfo?(nchevobbe)

(In reply to Alex Thayer [:alexical] (she/her) from comment #4)

Nicolas, is this a bit of a dupe of what we're seeing in bug 1896461? I.e., if the visibilityChange notifications were working as intended, would we still be seeing this?

Florian didn't said if the tab that had DevTools was the active one.
If it was active, then Bug 1896461 wouldn't really help, Bug 1594378 or Bug 1308441 would help here.

Not sure if this bug is worth keeping open since we have all the other ones.
Florian, do you think it's still relevant to have this open?

Depends on: 1896461, 1594378, 1308441
Flags: needinfo?(nchevobbe) → needinfo?(florian)

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #5)

(In reply to Alex Thayer [:alexical] (she/her) from comment #4)

Nicolas, is this a bit of a dupe of what we're seeing in bug 1896461? I.e., if the visibilityChange notifications were working as intended, would we still be seeing this?

Florian didn't said if the tab that had DevTools was the active one.

I don't remember, but looking at the profile linked in comment 0, I see the screenshots (and user interactions) are for the profiler tab that doesn't have devtools in it, so it's a fair assumption that devtools was in a background tab.

Not sure if this bug is worth keeping open since we have all the other ones.
Florian, do you think it's still relevant to have this open?

It's not an exact duplicate of bug 1896461 as there's no visibilitychange event involved in the profile here, the jank happens here when a new network request occurs. But it's likely that fixing visibility handling for devtools would fix both bugs at once. I would keep both open until it's fixed, but I don't have a strong opinion.

Flags: needinfo?(florian)
Duplicate of this bug: 1914962
See Also: → 1919594
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: