Dragging a tab group in a window with many tabs hangs the browser for about 30 seconds
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox144 | --- | unaffected |
| firefox145 | --- | unaffected |
| firefox146 | --- | verified |
| firefox147 | --- | verified |
People
(Reporter: handyman, Assigned: nsharpley)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 external file)
I've got a few thousand tabs open in a window and, when I try to drag a tab group in that window, the drag icon doesn't get more than a tab or two away before the (entire) browser hangs for 30 seconds. After that, the browser performs normally. A profile is here.
Some stats:
- I have four windows open. One has thousands of tabs, one has hundreds, and two have about a dozen. In the windows with dozens or hundreds of tabs, I can drag tab groups freely. This only happens in the other window.
- I've tried troubleshooting mode -- no change.
- Dragging normal tabs works fine.
- The tab group has about a 10 entries.
| Reporter | ||
Comment 1•1 year ago
|
||
I just had the same experience in the same window, but this time it was just dragging a tab, not a tab group. It seems to be happening somewhat reliably. Here is the profile for dragging one tab.
Comment 2•1 year ago
|
||
Here's a similar profile from vchin: https://share.firefox.dev/47gNKEk
It looks like what's happening is that the _updateTabStylesOnDrag method in tab-stacking.js is layout thrashing - for each tab in the tab strip, it is updating styles on that tab, then getting the client rect, so we're synchronously flushing layout once per tab. That's going to get very slow, especially for many tabs, and especially on slower machines.
Comment 3•1 year ago
|
||
This might be a dupe of bug 1996863.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Set release status flags based on info from the regressing bug 1983124
:nsharpley, since you are the author of the regressor, bug 1983124, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 5•1 year ago
|
||
Here's the loop where we synchronously flush layout, once per tab in the window: https://searchfox.org/firefox-main/rev/0b834e0ecd40295f11cf8218ff144035827f9866/browser/components/tabbrowser/content/tab-stacking.js#415-433,440
Comment 6•1 year ago
|
||
Hey handyman,
If you set browser.tabs.dragDrop.multiselectStacking to false, does the performance problem go away?
| Assignee | ||
Comment 7•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Reporter | ||
Comment 9•1 year ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) from comment #6)
Hey handyman,
If you set
browser.tabs.dragDrop.multiselectStackingtofalse, does the performance problem go away?
It is much better -- it's basically interactive speed. It feels a bit jankier than I recall in the past, but, with this many tabs, it was always finicky, so I can't guarantee that is an actual performance change. I can get pauses of about a second while dragging but mostly it is smooth.
Comment 10•1 year ago
|
||
Okay, thank you! I'll be very interested in knowing what the browser.tabs.dragDrop.multiselectStacking set to true experience is like after nsharpley's patch shows up in the next Nightly!
Comment 11•1 year ago
|
||
| bugherder | ||
| Reporter | ||
Comment 12•1 year ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) from comment #10)
Okay, thank you! I'll be very interested in knowing what the
browser.tabs.dragDrop.multiselectStackingset totrueexperience is like after nsharpley's patch shows up in the next Nightly!
Fixed! With browser.tabs.dragDrop.multiselectStacking set back to true, the new nightly looks good -- similar to how it looked with false before.
Updated•1 year ago
|
Comment 14•1 year ago
|
||
I was able to reproduce it on Win11x64 using FF build 146.0a1(20251028215909), after loading lots of bookmarks.
Verified as fixed on Win11x64 using FF builds 146.0b2 and 147.0a1.
Description
•