Tab-Session-Manager icon indicating copy to clipboard operation
Tab-Session-Manager copied to clipboard

Laggy performance with very big sessions on Firefox after upgrading to MV3

Open MagicalDrizzle opened this issue 1 year ago • 5 comments

Short description

Upgrading from 6.12.2 to 7.0.0 result in severe lags while quickly closing tabs or quickly pressing undo/redo in TSM's sessions window in Firefox with a very big session (Chromium isn't affected)

Steps to reproduce

  1. Start Firefox browser with clean profile
  2. Install Tab Session Manager
  3. Create a session with maybe 100 tabs of Wikipedia
  4. Quickly closes those tabs in TSM's session window.

Expected result

Should process smoothly.

Actual result

TSM becomes very laggy. It even takes a long time for TSM popup to load if you exit click the popup again.

Platform information

  • Platform (OS): Windows 10
  • Version of browser: 129.0
  • Version of Tab Session Manager: 7.0.0 and 7.0.1

Additional context

Seems like a memory leak/high CPU usage.

6.12.2: Quickly closing tabs

https://github.com/user-attachments/assets/93b3072b-8f03-4ec5-8b9d-3aca27854645

7.0.1: Quickly closing tabs

https://github.com/user-attachments/assets/1f10fc1f-5307-4bc1-b2ed-217a7e742d7f

MagicalDrizzle avatar Aug 10 '24 10:08 MagicalDrizzle

Have you tried profiling the Extensions process?

bwdq avatar Aug 12 '24 02:08 bwdq

Have you tried profiling the Extensions process?

I have tried here: https://share.firefox.dev/46Mopjt I can kind of see where things are going wrong but I'm not a webdev at all...

MagicalDrizzle avatar Aug 13 '24 09:08 MagicalDrizzle

I found this.removeTab in the flamegraph found on line 592 in ./src/popup/components/PopupPage.js

You can try git bisect to find the commit that introduced the issue.

bwdq avatar Aug 13 '24 10:08 bwdq

Actually it may be an upstream issue, I tried mozregression and got a range of 2023-05-15-21-56-23 to 2023-05-16-04-24-30, which seems to correspond to this range in the source. I'll probably go submit a bugzilla

MagicalDrizzle avatar Aug 13 '24 11:08 MagicalDrizzle

Update: It's probably an upstream issue - as there is only one commit on ./src/popup/components/PopupPage.js inbetween v6 and v7, and reverting the commit didn't work. If sienori can look into the profiler a bit and confirm it's upstream then I will close the issue.

MagicalDrizzle avatar Aug 13 '24 16:08 MagicalDrizzle