Closed Bug 1457114 Opened 2 years ago Closed 2 years ago
Resizing the inspector in vertical mode is super slow on big screens
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.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/b0682001d1f7 Throttle the inspector window resize handler with requestIdleCallback. r=bgrins
You need to log in before you can comment on or make changes to this bug.