arifwn / TinySuspender

Unload idle tabs to reduce memory and cpu usage.
55 stars 11 forks source link

Tabs vanish when uninstalling the extension #5

Open erlendorf opened 6 years ago

erlendorf commented 6 years ago

In the default configuration, when I deactivate/uninstall the extension, all suspended tabs vanish.

The vanished tabs don't even come back when I reactivate/reinstall the extension.

I understand that this is a limitation of the suspension technique used, and I as a user can prevent this behaviour by switching the experimental discard technique on.

But the big problem is that the tabs vanishing comes totally as a surprise to users.

A quick fix would be:

Advanced fix:

arifwn commented 6 years ago

Thanks for the suggestion! As the author I didn't realize this could be an issue since I never uninstalling this extension.

Clemens-Ratte-Polle commented 6 years ago

:( Why does it close alle tabs when deactivating TinySuspender?? o_O I just lost 80 tabs!

You have to implement options to backup the tabs. Backup when closing Addon or Browser.

Better it would be able not to loose all tabs but use a technique that Opera and all other addons do understand to handle them as normal tabs.

Good luck! :)

ps: There are other Suspender-Addons which can handle this problem better.

arifwn commented 1 year ago

Unfortunately, extensions can't listen for their own uninstall event at the moment, so TinySuspender won't be notified when it got uninstalled and can't perform cleanups such as waking up all suspended tabs.

For now, I'm putting a warning about this behavior in the settings page.

I'm open to suggestion, but our options seems to be limited. With the move to Manifest V3, hooking into the "unload" event like erlendorf suggested above is no longer viable. Saving the list of suspended tabs and restoring them when the plugin is re-installed seems to not viable as well because Chrome wipes out extension data on uninstall. Storing this data remotely might work, but I prefer to keep this extension completely offline.

I'm open to suggestion though. If there are other extensions that handle this better, I'd love to look into them.

Clemens-Ratte-Polle commented 1 year ago

Auto Tab Discard shall do it and all suspended tabs can be loaded even by uninstalled addon: https://webextension.org/listing/tab-discard.html

arifwn commented 5 months ago

TinySuspender has native tab discard support that can be enabled in the settings panel by ticking the "Use Native Tab Discard API" checkbox. When using this option, uninstalling the extension won't remove the suspended tab. Using the native tab discard means sacrificing certain functionalities though (e.g. limited control over suspending active tab and waking up background tabs), so it's not without drawback.