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

STG eating so much memory (RAM) #1235

Open
ntruter42 opened this issue Dec 24, 2024 · 5 comments
Open

STG eating so much memory (RAM) #1235

ntruter42 opened this issue Dec 24, 2024 · 5 comments

Comments

@ntruter42
Copy link

ntruter42 commented Dec 24, 2024

Describe the bug
I'm not exactly sure what it is in this extension that is taking so much RAM. My extensions alone sometimes ramps up to 7GB RAM and then it comes back down to about 3GB. When I disable STG, it comfortably goes to about 1GB (give or take 500MB). I've had to discard almost all my tabs just to keep Firefox from crashing because I don't have SWAP memory enabled and I only have 16GB RAM.

To Reproduce
Steps to reproduce the behavior:

  1. Simply browsing normally and then when I start to open new tabs (maybe having 5 or 6 in memory) then it randomly ramps up for a short moment (about 10-15 seconds) before it comes down.

Expected behavior
It shouldn't have to use +4GB to operate. When I have it disabled, my web extensions don't use more than 2GB ever. With it enable, it can go up to 7GB. Maybe even more.

Screenshots
Screenshot from 2024-12-24 14-39-10

Desktop (please complete the following information):

  • OS and version: Ubuntu 24.04.1 LTS
  • Firefox version: 133.0.3 (64-bit)
  • Simple Tab Groups version: 5.2

Additional context
I'm using the Ubuntu Snap version of Firefox, if that makes a difference.

@TimMensch
Copy link

I have 32Gb of RAM on Windows 10. Somehow STG caused Firefox to explode to fill all of RAM and spill over into my swapfile to the point where it filled C drive and caused a bunch of apps to crash out.

This was after I decided to "really use" STG and spent like an hour organizing tabs.

AND...it didn't save my changes. An hour lost, plus a lot of tabs lost.

Very very unhappy.

I'm running STG, No Script, and Auto Tab Discard. No other extensions. Running Firefox 133.0.3.

@ntruter42
Copy link
Author

I've since bought another 16GB RAM, totalling up to 32GB, and at one point web extensions ramped up to 9GB.

Could it be that I have +400 tabs in one group and +100 in another? Although, I have deleted the groups with +400 and +100 tabs and it's still using incredible amounts of RAM. I noticed it only begins to ramp up after some time of use (about 1-2 hours).

Here's what I have now:
Screenshot from 2025-01-03 10-09-45

@philg-dev
Copy link

Interesting... I've got a whole bunch of addons running at all times, including STG with 800+ total tabs in 20+ groups, and never experienced this problem at all. I've currently got 22 tabs in-memory and my webextensions only occupy ~200 MiB of RAM, shown both in the GNOME System Monitor as well as in Firefox's about:processes page.

image

image

(Side note: the additional process 11823 in the System Monitor with ~22 MiB is from a Firefox private window that was also running at the time.)

Until recently I've also only had 16 GB of RAM on my laptop and I've been "micro-managing" (monitoring and discarding) tabs both via the about:processes page as well as by discarding tabs or groups via the STG functionality for months to free up memory manually. I've only ever noticed the tabs themselves eating quite a lot of memory - especially sites like Twitch, YouTube, LinkedIn love to waste RAM like crazy.

Maybe you guys could try to use the memory reports on about:memory to get more detailed insight into what's going on with your extensions process.

Out of the ~200 MiB total RAM used by my extension process only about 25 MiB appears to be used by STG.
image

It definitely seems like something's going wrong in your cases for some reason. Maybe some kind of incompatibility among installed extensions?

Since one of you is on Linux (snap) and one is on Windows, I doubt that this matters but I've installed Firefox via the official PPA for APT as found here: https://support.mozilla.org/en-US/kb/install-firefox-linux


Pop!_OS 22.04
Firefox 133.0.3
STG v5.2
64 GB RAM
(SWAP still enabled from a while back when I only had 16 GB RAM)

@ntruter42
Copy link
Author

ntruter42 commented Jan 7, 2025

@philg-dev I did not know or think I could check the about:memory and about:processes for more details on this. Thanks!

I've since switched over to Windows, installed all the same extensions with my backed up configurations for each, in the same version of Firefox and I've not yet ran into the issue.

I will go back to Linux soon to check it out, because I too suspect that it may be a conflict of some sort with other extensions. When I disabled STG, the RAM is not freed up immediately. It takes another 5-15 minutes before it begins going back down, so it very well could be another extension using all that memory to process the hundreds of tabs (even when not in memory).

Your input is very much appreciated 🙏.

@philg-dev
Copy link

You're welcome 👍️

If you end up figuring out more details about the issue, it would be great to know the exact scenario / steps to reproduce the issue, so hopefully it can be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants