navorite / sessionic

A web extension to save, manage and restore sessions, windows and tabs.
GNU Affero General Public License v3.0
461 stars 18 forks source link

Slow to list tabs #132

Open AJolly opened 4 months ago

AJolly commented 4 months ago

Describe the bug

Sessionic seems quite slow ~3sec on ff to show what tabs I have open, I originally thought it was broken. I'm on extremely fast hardware.

I freshly pulled the repo and did a build.

Otherwise I like that I was looking for a session buddy replacement on Firefox. One minor

Reproduction

Press extension button to open popup. Wait.

Version

1.7.0

Browser

FF 123

Operating System

Win 11

Severity

None

navorite commented 4 months ago

Is it slow if there is a low amount of tabs open?

AJolly commented 4 months ago

Tab Manager or any other session tool I use shows them fairly instantly, so if sessionic can't handle that there is a deeper issue. I'm on an OC'ed 13900k.
Currently have 300 tabs open.

Dropping them down to 129 does make it work faster, but theres still a notable wait. 39 theres a tiny bit of lag perceptale, but fairly fast.

I'm betting it's not maintaining the list in the background, so it has to requery every time you press the button?

Also from a UI perspective it's not immediately clear what to do to restore a saved session. I tried double clicking, but I think that triggered multiple times, so now I have 800+ tabs open. (luckily a dupe tab extension can trim that back down for me)

Also it seems like its being slow to update the current number of tabs etc: The two sessionic windows disagree on the total tab number, and the total tab number right now is 839.

image

navorite commented 4 months ago

Tab Manager or any other session tool I use shows them fairly instantly, so if sessionic can't handle that there is a deeper issue. I'm on an OC'ed 13900k. Currently have 300 tabs open.

Dropping them down to 129 does make it work faster, but theres still a notable wait. 39 theres a tiny bit of lag perceptale, but fairly fast.

I'm betting it's not maintaining the list in the background, so it has to requery every time you press the button?

Also from a UI perspective it's not immediately clear what to do to restore a saved session. I tried double clicking, but I think that triggered multiple times, so now I have 800+ tabs open. (luckily a dupe tab extension can trim that back down for me)

Also it seems like its being slow to update the current number of tabs etc: The two sessionic windows disagree on the total tab number, and the total tab number right now is 839.

image

It's due to an optimization I did to prevent memory and CPU usage in the background constantly even when you're not using the extension / focusing on the extension tab & window. I'm still not sure whether I want to go that route or not. I will try to improve the situation though.

To restore a session you click on its name once and that's it. I agree that's a terrible UX. I will rewrite the extension at a later time and I will improve the UI and the CTAs.

AJolly commented 4 months ago

I understand the tradeoff - SB tends to refresh it way too frequently if you have the dashboard open. I suggest considering maintaining some sort of cached view - and refreshing more frequently if the dashboards open (like if your using it to switch between or close open tabs)

navorite commented 4 months ago

I understand the tradeoff - SB tends to refresh it way too frequently if you have the dashboard open. I suggest considering maintaining some sort of cached view - and refreshing more frequently if the dashboards open (like if your using it to switch between or close open tabs)

The problem is that it is made using a soon-to-be deprecated MV2, in which this kind of technique is possible. On MV3, the background script tends to close after an inactivity period (typically 30 seconds).