Closed Bug 1457114 Opened 2 years ago Closed 2 years ago

Resizing the inspector in vertical mode is super slow on big screens

Categories

(DevTools :: Inspector, defect)

defect
Not set

Tracking

(firefox62 fixed)

RESOLVED FIXED
Firefox 62
Tracking Status
firefox62 --- fixed

People

(Reporter: pbro, Assigned: gl)

References

Details

Attachments

(2 files)

Attached video 27-inch.mp4
STR:
- open any Firefox window, on a big screen (Martin, who found the issue was testing on a 27 inches external monitor)
- open the inspector, and dock it to the side
- make devtools really big (covering much of the window)
- then drag the splitter towards the right to make devtools smaller and smaller

==> This is slow and laggy.

The bigger the browser window is, the worse it gets.

It only does it when making devtools smaller. While making it bigger doesn't show any issue.

Here's a couple profiles: 
https://perfht.ml/2r1E0Zj
https://perfht.ml/2vLALux

It might not just be an inspector thing, Martin was saying: it seems to affect tools with more than 1 panel. Like console works much better, but debugger is already slow. However, inspector is the worst of all of them.
I looked at the profiles a little bit and concluded that the issue must be coming from here: 
https://searchfox.org/mozilla-central/rev/78dbe34925f04975f16cb9a5d4938be714d41897/devtools/client/inspector/inspector.js#531-539

The inspector has a window resize handler (no throttling, or debouncing) that we use to refresh the splitter state. 
Doing so, we check if we need to switch the inspector from vertical to horizontal mode (and vice versa). Doing this forces a sync reflow, because we need to measure the size of the window.
Assignee: nobody → gl
Status: NEW → ASSIGNED
Attached patch 1457114.patchSplinter Review
Carrying over the r+ from Bug 1448096.
Attachment #8976273 - Flags: review+
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b0682001d1f7
Throttle the inspector window resize handler with requestIdleCallback. r=bgrins
https://hg.mozilla.org/mozilla-central/rev/b0682001d1f7
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Product: Firefox → DevTools
Depends on: 1469184
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.