bwinton / TabCenter

Firefox add-on for arranging tabs vertically
https://testpilot.firefox.com/experiments/tab-center
208 stars 55 forks source link

Closing a large number of tabs & windows with tab center enabled hangs the browser #1053

Closed mystor closed 7 years ago

mystor commented 7 years ago

Profile: https://perfht.ml/2pbpbRj (sorry it's not symbolicated - I had to use GDB to dump the profile as the browser completely hung up and wouldn't let me resume control).

It looks like we're spending a lot of time in https://github.com/bwinton/TabCenter/blob/caf419af625d200fc1e665cd5167695280bc528f/verticaltabs.js#L465 which makes me think that that line of code is triggering a lot of style recomputation or similar.

To reproduce this, I was on linux and had tabcenter enabled and a large number of windows opened. I used https://addons.mozilla.org/en-US/firefox/addon/close-other-windows/ to close all of my tabs very quickly and then my browser hung for multiple minutes. I had to use gdb to get the profile stack. The content process appeared to be operating fine, although the chrome was completely unresponsive.

grahamperrin commented 7 years ago

Here: Firefox on TrueOS Desktop (FreeBSD-CURRENT).

https://addons.mozilla.org/en-US/firefox/addon/close-other-windows/ to close all of my tabs very quickly

I tried that approach a few times (less than ten) with version 0.1 of the extension, Firefox probably 53.0.2 at the time. At least one of the attempts was with Tab Centre disabled. Use of the extension seemed likely to crash Firefox, which is extremely unusual on FreeBSD (YMMV).

Now with Tab Centre enabled, I'll try that extension once more …

and then my browser hung for multiple minutes. …

I'd half-expect that (here, at quit time the Firefox process typically runs for a few minutes after all windows close … not a complaint, I guess it's because my 'everyday' profile is heavily extended).

grahamperrin commented 7 years ago

@mystor would you like me to use https://github.com/mystor/close-other-tabs for an issue with your Close Other Windows extension?

mystor commented 7 years ago

@grahamperrin Sure.

grahamperrin commented 7 years ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1373822#c4 under Mozilla bug 1373822 - Lag when closing tabs refers to Tab closing became very slow in today's nightly · Issue #598 · mozilla/testpilot-containers

grahamperrin commented 7 years ago

Please: with release 56.0 of Firefox, is this still an issue?

bwinton commented 7 years ago

Given that TabCenter doesn't work on 56, I'm going to say no, or at least, we're not going to fix it. 😉

Thanks for the report, though!

grahamperrin commented 7 years ago

(Oops! Sorry for the carelessness. I forgot about the explicit incompatibility. A couple of weeks ago I loosely thought of this issue whilst thinking more broadly of performance-related issues elsewhere.)