Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Marvellous Suspender need your help to survive. #197

Open
gioxx opened this issue Oct 18, 2022 Discussed in #196 · 103 comments
Open

The Marvellous Suspender need your help to survive. #197

gioxx opened this issue Oct 18, 2022 Discussed in #196 · 103 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@gioxx
Copy link
Owner

gioxx commented Oct 18, 2022

Discussed in #196

Originally posted by gioxx October 18, 2022
I wrote an article summarizing what might be the future of this add-on. Do you think you can help with its survival? Bring it on!
IT: https://gioxx.org/2022/10/18/the-marvellous-suspender-a-look-into-the-future/
EN: https://gioxx.org/2022/10/18/the-marvellous-suspender-a-look-into-the-future/#en-us

Thanks to all our users and contributors.

June 2024: So Long, and Thanks for All the Fish
🇮🇹 https://go.gioxx.org/tms-thelastdance
🇺🇸 https://go.gioxx.org/tms-thelastdance#en-us

@gioxx gioxx added the help wanted Extra attention is needed label Oct 18, 2022
@gioxx gioxx self-assigned this Oct 18, 2022
@gioxx gioxx pinned this issue Oct 18, 2022
@gioxx gioxx closed this as completed Oct 18, 2022
@gioxx gioxx reopened this Oct 18, 2022
@jackphelps
Copy link

Sounds like they've postponed it some, and this is a promising announcement: https://groups.google.com/u/0/a/chromium.org/g/chromium-extensions/c/zQ77HkGmK9E

... it seems like probably the package wouldn't have worked anyway, without access to the DOM, but that they might be reconsidering that?

I haven't written js in a long time, so I'm not sure about that and don't feel especially qualified for the upgrade, but I'm following the issue and can at least take a look when I have time. Thank you for all the work you've been putting in!

@gissf1
Copy link

gissf1 commented Mar 29, 2023

@gioxx I could try helping out here with development occasionally, if you still need assistance. I haven't looked into any of the code here yet, but I'm a long term user and have many years of software development experience.

Is there any development plan in place, or do we still need to design that yet?

Since the latest Chrome (v110+?) now has Memory Saver built-in, maybe the new version of this plugin should build on top of that, and avoid duplicating any overlapping functionality? I think it would make sense to compare what we offer with what Memory Saver does to avoid redundant effort.

@gioxx
Copy link
Owner Author

gioxx commented Apr 5, 2023

Ciao @gissf1
thank you for your message, it's really heartening, and yes, I confirm that my request for help still stands today because as you may have seen, I have stopped the development of the extension to try to regroup with someone really capable and breathe life back into this project that I would be so sorry to have cease.

There is no new development plan to date; it should be designed from scratch.

The latest version of Chrome certainly brings on board the Memory Saving feature, which could be better exploited via Marvellous Suspender, which-perhaps-at this point could really lighten up and dedicate itself to more special features requested loudly by users. I totally agree with you about avoiding developing something that already exists and perhaps going against what Google introduced.

@ossilator
Copy link

due to an issue created for TGS, i noticed that there is now something that calls itself "The Great Suspender Original" and at least superficially seems to be a continuation of the original work. as TGS is GPL-licensed, you're free to use the derived work even if the owner doesn't publish the source or even protests.

there is also "The Great Suspender", which is presumably another fork.

@gioxx
Copy link
Owner Author

gioxx commented Apr 7, 2023

The Chrome store is full of forks of the original extension, "The Great Suspender Original" I hadn't noticed it while "The Great Suspender" yes.

It would be nice if developers would provide references to repositories here on GitHub (GitLab or anything else) where we can work together and check that everything is in order (although you could always download the extension files and analyze them as much as possible).

@christopherreay
Copy link

christopherreay commented May 1, 2023

Hmm..

So I am interested (not commiting to!) in taking on the role you suggest, to redevelop TMS.

My entire life/work cycle is dependent on TMS. I have.. about 60 browser profiles, with currently maybe... 5000 open tabs.

For my part there are a couple of things I might add to the tool, but basically it does exactly what I want and is efficient and clean and doesnt do annoying stuff :)

I have got many people to install this. I am a full time developer and product owner, working globally on many projects including ReFi and etc etc.

but hey, gotta give back some time

Couple of questions... like

  • what is the current installed userbase of TMS?
  • are there other tools that do the same thing (not including clones of the original repo, I was there when TMS took over from TGS)? And that are perhaps being maintained, and we could just build a bridge from TMS to their format, and build an autoexporter, and allow that project to take the mantle?
  • if not... does TMS monetise itself in any way? Accept donations? or... anything at all? ( dont need the money, but its important to the project profile to understand)
  • From there, I would start to look at what context the new Manifest3 puts on the fundamental intention of TMS, how does it get changed into that new space.... does chrome perhaps already do pretty much all of what TMS might do in Manifest3 space?

lets have a chat on here for a bit, and then we can have a zoom at a later date if it all fits.

also fyi, i have been meaning to build some tools for browser extension management into our platform, so this is a good excuse :) tyty for the wonderful work so far ;) x

@ossilator
Copy link

ossilator commented May 2, 2023

you could have looked yourself ...
i found two serious contenders:

https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh

  • this is a "serious" one; it can apparently do everything TMS can do. specifically, it can do "traditional" suspend ("parking") with optional use of native discard. but it's not open source (though it all being JS, you could at least audit it)

https://chrome.google.com/webstore/detail/tiny-suspender/bbomjaikkcabgmfaomdichgcodnaeecf

  • foss. apparently, it can't combine traditional suspension with native discarding so far (there is a mode toggle to do exclusively one of them).

then there is also a bunch of "discarders", which have the inherent disadvantage that they are unable to suspend the foreground tab in a (visible?) window (when you discard the current tab, the "auto tab discard" extension just switches to the next tab).

(there is also "workona tab suspender", which i'd classify as malware, which you'll understand if you try it ...)

@christopherreay
Copy link

I indeed could have, but to do a thorough check of things that I havent been keeping track of would take days. Im supergrateful, and had noticed you had been keeping track.

So basically... TMS is one of or the leading tool for this. It has a great following as far as I can tell. I will have a look at the other things you suggested and compare.

Honestly I was asking some clear questions to the people that run this since it is a concern of theirs, I am just a user.

Im willing to commit a bunch of time.

I reviewed yesterday for a couple of hours the Manifest3 stuff from chrome, and I understand all of it since I work with browsers and do weird and wonderful things with them every day.

Next thing I will do is have a look through the TMS code and see what I can see in terms of migration. As far as I can tell there shouldnt be that much to do for it.

If you want to take on the role, @ossilator, im perfectly happy for you to do that, Im not competing with you.

@ossilator
Copy link

noooo, you go ahead. you may hear from me when you post PRs. 😁

@christopherreay
Copy link

OK Pal! Thank you :)

I will have a bunch of free time in July. Lets see if I can get it oaann :)

@trekshcool
Copy link

OK Pal! Thank you :)

I will have a bunch of free time in July. Lets see if I can get it oaann :)

Really glad to see someone is on this, I personally have too many tabs tied up in the suspender ecosystem. Now both the other forks have died and been nuked form the store. One of them was even flagged as malware and nuked all my tabs which I only managed to recover because I had other ways to save the tabs which then I had to edit out all the extension stuff reload all my 500 tabs in full and then resuspend with TMS.

I am pretty rusty in terms of coding but I can probably help bugfix when the time comes.

@ThisIsSammysAccount
Copy link

Hi Gioxx. I've was a long time user of Great Suspender and switched to TMS very early, so I greatly appreciate your effort to keep this project alive and would like to see it continue. There have not been any updates here since June - did christopherreay get involved or has there been any traction on the upgrade? I am a developer and may be able to help but I don't want to blindly insert myself. I'd also be interested in understanding the overlap between this extension and Chrome's new memory management features, as asked in #218. Because TMS does such a great job I've never experimented with Chrome's new functionality - hoping someone here can give a simple comparison. Thanks!

@christopherreay
Copy link

christopherreay commented Sep 19, 2023

So the chrome thing is called "Chrome Memory Management".

  • chrome page state lifecycle

built in stuff

  • Chrome has tab "freezing", which keeps all the memory of tabs, but doesnt update the DOM and can cause javascript to pause too.
  • Then there is tab Discard, which you can see in the state diagram, and which is "like TMS"

The Marvelous (that we all love) Suspender

  • Marvelous suspender navigates to a new page, potentially leaving the old page in the "back cache" (you can see that in the diagram as well if you read the bits and pieces in the bottom right).
  • Marvelous Suspender keeps the favicon (this is a bit problematic on my system sometimes, as it seems to want to reload the favicons all the time)
  • TMS puts up the page we know and love which has three features I use.
    1. I can copy the original url from the URL in the new page
    1. I can copy the actual address bar URL of the TMS page, and copy that to a different browser and it will still work properly
    1. clicking anywhere on the page loads the page afresh.
  • TMS has the export/import tooling, which is also very useful

comparison Chrome Discard, and TMS

  • so Chrome Discard aims to be totally transparent to the user
  • this creates some issues for developers, which chrome has extensive documentation about... the diagram above shows that it is possible for a tab to be "discarded" without any notification to a web page, which means from a use perspective a page has to be able to ... like reload itself into exactly where it was before, without any provocation, and without the user noticing
  • this is different to the TMS where it is very clear to a user that a page has been unloaded.
  • I find that if something gets unloaded by tms that I didnt want unloaded, I just whitelist it. This is good UX imo
  • There's no tools for managing tabs as in export
  • It doesnt have "Marvelous" in the title.

Other stuff

  • Ive reveiwed the upcoming changes to ... chrome manifest version 3.0 and it shouldnt really have an impact on how TMS works. It will impact heavily stuff like ublock_origin, which relies on keeping bock lists up to date.

Thats a decent first go at it. If anyone has any questions we can all try and answer them.

Is there a way of contacting the users? Any idea? I have to say I didnt really consider the "community" around TMS until the debacle with the sale.

@Crypto-Spartan
Copy link

Crypto-Spartan commented Sep 20, 2023

Thanks for providing all of this info, this has been super informative.

I do have some additional questions:

  • what is the behavior when TMS & chrome tab discarding are both enabled?
  • if you have an extension such as Auto Tab Discard, how does this change Chrome's discarding behavior? (does it purely just make it timer-based when the tab isn't active?) what happens if you use Auto Tab Discard with chrome's memory saver? what happens if you use it without?
  • how does this TMS setting interact with chrome's memory saver? (apply chrome's built-in memory saving):
    image

@mkz7
Copy link

mkz7 commented Sep 20, 2023

Sad to say, I have been informed by Gioxx that users of The Marvellous Suspender will have to replace it with another option once manifest v3 goes into effect (assumed to be as of Jan. 1, 2024). Apparently, no group effort to keep TMS alive has materialized.

Is there any consensus at the current time as to what the best replacement(s) for TMS is/are?

@Poopooracoocoo
Copy link

Jan 2024 is an old date for the removal of MV2 extension APIs in Chrome, if I recall correctly. I don't think Google has set a new phase out date yet.

@mkz7
Copy link

mkz7 commented Sep 20, 2023

I don't think Google has set a new phase out date yet.

Gioxx is no doubt aware of that, and perhaps the date will be extended.
But as of the current date there is no projected continuation of TMS once v3 goes into effect.
If group development does occur in the interim, the pessimistic forecast could indeed change.
I reported the current projection.

@christopherreay
Copy link

christopherreay commented Sep 20, 2023 via email

@mkz7
Copy link

mkz7 commented Sep 20, 2023

I've already mentioned and analysed the requirements of v3. in fact in my response two days ago.

So your conclusion is that TMS requires nothing to continue 'as is' under v.3?

Also, what does "the debacle with the sale" refer to?

@christopherreay
Copy link

Aye, so the major changes for manifest 3 are about the interface to the internet for extensions. This "makes everything more efficient", whilst also making it a total pita for extensions to update or access any information. So... ublock_origin will only be able to update blocklists by actually updating the extension.

There may be some syntax changes, or w/e, but fundamentally the v3 changes dont really interact with the core behaviour of TMS.

So TGS was sold to someone who then turned TGS into malware, which is what caused TMS to be forked

Cheers :)

@mkz7
Copy link

mkz7 commented Sep 20, 2023

Presumably, gioxx is aware of the situation and has nonetheless forecast the end of TMS.

My impression is that a level of developer networking to keep it alive would be needed that so far has not occurred and that gioxx doesn't expect to occur.

If your view turns out to be accurate, the unexpected tenure of TMS with no revamping will no doubt be welcome both to gioxx and to all of TMS's users.

I knew about TGS and its 'bad end' but wondered what that has to do with the current status quo -- i.e., the survival of TMS under manifest v3.

@ThisIsSammysAccount
Copy link

Thanks christopherreay for the excellent info and Crypto-Spartan for asking basically the same follow up questions I had. I looked into a couple of the answers:

  • what is the behavior when TMS & chrome tab discarding are both enabled?

There are 2 Chrome features to consider, Tab Freeze and Discard, both of which can work alongside TMS. The Freeze feature, as mentioned, puts a page in the "Frozen" state and basically disables scripting on events on the page. That will result in CPU usage improvements, but not necessarily memory improvements unless the site developers follow the recommendations and clean up on this event. Details on the frozen state and recommendations here:
https://developer.chrome.com/articles/page-lifecycle-api/#state-frozen

The Freeze event will still take place on hidden pages both before TMS suspend kicks in, and after a page is suspended and put into back cache (as long as the TMS "chrome memory saver" option detailed below is not enabled). I couldn't find documentation on exactly when the Freeze event happens so I went to the Chromium source. As far as I can tell, it basically applies to everything but your last 3 visible tabs, so it will certainly trigger before TMS steps in.
https://github.com/chromium/chromium/blob/main/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageAssassin.java#L87

The Discard event could occur before TMS' timer steps in, if a page was whitelisted in TMS, or after a page was suspended by TMS (either immediately, see below setting, or "naturally"). I'm not positive exactly when the Discard event "naturally" occurs, but it appears to relate to a Chrome flag or setting that isn't visible anymore or defaults to 120 minutes of tab inactivity. In concept, this would mean that tabs are Discarded before, after, or potentially concurrently to TMS attempting a suspend, depending on the TMS setting. The Discard is what would provide the main memory savings.

  • if you have an extension such as Auto Tab Discard, how does this change Chrome's discarding behavior?

Not positive as I don't use any other memory management extensions. I expect it just further modifies the timing of the Discard event as noted below.

  • how does this TMS setting interact with chrome's memory saver? (apply chrome's built-in memory saving):

From the tooltip info:

"Reduces a suspended tab's memory usage even more, by utilizing
Chrome's built-in 'tab discarding' functionality. This can result in up
to 500% memory savings when working with large numbers of tabs.

However, it will also cause a slight rendering delay when selecting
a suspended tab."

That actually is not the full story. What it actually does is attempt to forcefully Discard the tab as soon as TMS suspends it. As noted in the flowchart above, a Discard is more aggressive than a Freeze and is the same as a full tab close, so awakening the tab in TMS will reload it fully and you will lose state and form data. That may still occur after a period of time if the setting is enabled in Chrome, see above, but may be too aggressive if your TMS suspend timer is set low. The actual forced discard process happens here:
https://github.com/gioxx/MarvellousSuspender/blob/master/src/js/gsTabDiscardManager.js#L28

More good info on tab Discards and managing them:
https://arstechnica.com/gadgets/2023/02/chrome-110-will-automatically-discard-background-tabs-heres-how-to-stop-it/

It seems to me that since back cache is "standard" in the current version of Chrome, to get the full benefit of suspending tabs either the TMS "chrome memory saver" option or the native Chrome Memory Saver option needs to be enabled. They do the same thing, the question will just be on timing and how much control you want to have without an additional extensions.

To summarize, it does appear that Chrome is now capable of providing most of the performance benefit that TMS used to bring. As noted, however, TMS provides much more control, the ability to look through suspended (potentially Discarded) tabs without bringing them back to life, a better user interface, and session tracking with import/export. To me, that is still enough of a reason to keep it alive, so it is worth the effort to look into the manifest migration.

@ThisIsSammysAccount
Copy link

I find myself missing TMS a lot less than I expected when it is not enabled. To fully prove that, however, I just manually disabled TMS today with ~400 tabs open, so let's see how it goes. I would be interested in hearing from other people who have turned off TMS for a while and compared the difference as well.

Well, I proved myself wrong. With that many tabs, even with Chrome's Memory Saver set to Maximum there is a massive memory and performance difference with TMS disabled. The Chrome feature works OK for casual use, but TMS still reigns supreme. If TinySuspender can work on v3 then we should be able to figure TMS out as well.

@christopherreay
Copy link

christopherreay commented Sep 20, 2024 via email

@Crypto-Spartan
Copy link

I find myself missing TMS a lot less than I expected when it is not enabled. To fully prove that, however, I just manually disabled TMS today with ~400 tabs open, so let's see how it goes. I would be interested in hearing from other people who have turned off TMS for a while and compared the difference as well.

Well, I proved myself wrong. With that many tabs, even with Chrome's Memory Saver set to Maximum there is a massive memory and performance difference with TMS disabled. The Chrome feature works OK for casual use, but TMS still reigns supreme. If TinySuspender can work on v3 then we should be able to figure TMS out as well.

This is super concerning for me, I routinely have 500+ tabs open and get away with it via TMS

@nfultz
Copy link

nfultz commented Sep 20, 2024

If TinySuspender can work on v3 then we should be able to figure TMS out as well.

It would probably be easier to add the features you want to TinySuspender than to rewrite TMS, though.

@christopherreay
Copy link

christopherreay commented Sep 20, 2024 via email

@trekshcool
Copy link

Perhaps we cam request the tinysuspender admin to take over this one after all this extension already has so many users and good features

@christopherreay
Copy link

christopherreay commented Sep 20, 2024 via email

@trekshcool
Copy link

I have emailed him a plea lets see how he responds.

@christopherreay
Copy link

christopherreay commented Sep 20, 2024 via email

@trekshcool
Copy link

If TinySuspender can work on v3 then we should be able to figure TMS out as well.

It would probably be easier to add the features you want to TinySuspender than to rewrite TMS, though.

Yeah but imagine what will happen when this gets wrecked by chrome and then deletes the tabs of over 100k users, last time this happened with a suspender extension when the original one was wiped from the chrome store it causes so many issues for so many people.

@christopherreay
Copy link

christopherreay commented Sep 20, 2024 via email

@aybanda
Copy link

aybanda commented Sep 23, 2024

@christopherreay @trekshcool

Here is what I think I can help contributing:

Code Migration: I can assist in migrating the codebase from Manifest V2 to Manifest V3. This involves updating the manifest file, converting background scripts to service workers, and adapting APIs to work with the new manifest version.

Feature Preservation: I can help identify which features can be preserved in Manifest V3 and which ones might need alternatives. For example, tab suspension and restoration, whitelist functionality, and settings management can likely be preserved, while some background processes may need to be reimplemented.

Performance Optimisation: I can work on optimising the extension's performance within the constraints of Manifest V3, such as implementing efficient state management in the service worker and minimising resource usage.

@christopherreay
Copy link

christopherreay commented Sep 23, 2024 via email

@aybanda
Copy link

aybanda commented Sep 23, 2024

I'm Ajay and a developer
Helping solving issues

@christopherreay
Copy link

christopherreay commented Sep 23, 2024 via email

@aybanda
Copy link

aybanda commented Sep 23, 2024

I have no idea about that

@trekshcool
Copy link

Tinysuspender owner is @arifwn

Thanks a lot to @aybanda for saving this project.

@aybanda
Copy link

aybanda commented Sep 23, 2024

It's too early to thank me
@trekshcool

@aybanda
Copy link

aybanda commented Sep 23, 2024

@christopherreay @trekshcool @gioxx
check this PR #236

@trekshcool
Copy link

What would be the steps involved in testing this out, I can get the chrome beta branch which has v3 but how to download the compiled extension with your pull request from github or will it have to wait until its committed into the master.

@user334
Copy link

user334 commented Sep 23, 2024

@trekshcool the Chrome's extensions are more or less just zip files with all the contents you see here in the repo. So I think you can just clone or simply download @aybanda's fork and install it to any Chrome instance you have by drag'n'drop-ing its folder onto chrome://extensions settings page. Note that you have to enable the "developer mode" switch there to be able to do so.

@d1Bihkte
Copy link

d1Bihkte commented Oct 10, 2024

image

@christopherreay
Copy link

christopherreay commented Oct 10, 2024 via email

@trekshcool
Copy link

Its finally happening, chrome is now a/b testing disabling v2 extensions on the latest main chrome release.

For those of us who have the registry trick it will work for a few more months but for the rest the end is now.

@Technetium1
Copy link

I've completed my move away from Chrome, and have helped very many others do the same. I am already satisfied by the stock discard ability in Firefox and derivatives, but I've further enhanced it with Auto Tab Discard. There's a Chrome version, but I haven't tried it due to trying to leave Chrome. Seems to not have the MV2 banner in the Chrome store, so it may work in the future.

Avoid browsers based on Chromium; Brave, Opera, Edge, Vivaldi, and Chrome. It just digs us into a deeper hole.

I've been enjoying this browser the most so far https://github.com/floorp-Projects/floorp/, along with these extensions https://github.com/Technetium1/BrowserExtensions

@christopherreay
Copy link

christopherreay commented Oct 30, 2024 via email

@mpql
Copy link

mpql commented Oct 30, 2024

I prefer doing development and manual testing in-browser via Chromium. I use Brave for this, and it works great. Brave has already force-enabled Manifest V2 support, and is supposedly going to continue support for Manifest V2 for as long as they're able.

For my own use cases and experiences, I've found anything based on Firefox to be lacking in a lot of basic areas (still can't find anything to reliably to change keyboard shortcuts, e.g. the Ctrl+Shift+P New Private Tab option), and even though they have new "features" that pop up and feel like ads to me (and that's to say nothing of default-on "Experiments" and telemetry extensions being downloaded to your browser), they seem to fall behind in terms of browser feature support, user experience, and even just base engine upgrades.

For privacy, I use LibreWolf, and for customizability / work / as a daily driver, I use Brave. I don't think it's (yet?) called for to swear off Chromium-based browsers.

@christopherreay
Copy link

christopherreay commented Oct 30, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests