r/AskProgramming • u/SandwichForLunch • 6h ago
Why don't browsers have "Pause" features to limit RAM usage?
Situation / Background Info (if TL;DR skip to the actual question at the bottom):
I'm currently playing a CRPG (Pathfinder: Kingmaker, just think of Baldur's Gate 3 if you're unfamiliar) which, for an optimization-inclined player such as myself who is not super familiar with the mechanics, requires a LOT of open Wiki pages to see how things work and what skills/spells/items/etc do. I go back to reference many of these pages occasionally, so it's easiest to keep them open.
At times I also have Youtube open, I'm sometimes taking a break and browsing other stuff, or even letting something download in the background while I play.
I think to myself:
Right now I have 8 wiki/guide tabs open, and that's after closing over 10 others, ones which I don't have to check as frequently. I also have 6 other tabs open unrelated to the game, most of which I only touch once a day or even once every couple of days.
Why the heck does my Internet Browser take up 5+ GB of my RAM, just to "hold" these pages in the background? And when I do check on them, I don't require to actually do anything advanced? They might as well be a large screenshot for my purposes.
I googled and found this answer:
https://www.reddit.com/r/AskProgramming/comments/s8ogk6/how_do_browsers_use_so_much_ram/
If I understand correctly, the short of it is that each tab runs its own instance of an engine for various purposes. That much makes sense.
The first available (lacking) solution:
I use OperaGX, which at least in its advertising seemed to be very proud of its "RAM Limiter" feature. All it does is give you a slider where you can limit your RAM usage for the browser - essentially I can set the slider to [X] GB and it will only ever take up [X] GB at a time.
Why it is lacking:
As far as I can tell, if I set the limit to, say, 1 GB, there is no differentiation between what I care or don't care about. Maybe my youtube video will be affected all the same, resulting in stuttering or being unable to play at all. Maybe that download I'm doing in the background will be affected.
The other available solution:
I did a little googling on "Tab Suspender" extensions, which claim to reduce memory usage by hibernating tabs you haven't used in some amount of time. It's not my perfect solution, as I don't even care to have the tabs run all their garbage even when I AM accessing the page, but maybe it's good enough.
I find "The Great Suspender Reloaded" which seems to be the #1 recommendation (or at least, the original Great Suspender was...), go to download it, and OperaGX pops up with a warning window:
"This extension's contents have not been verified by Opera"
"It can: Read and change all your data on all websites."
"It can: Read and change your browsing history on all your signed-in devices."
Well if that's not the biggest red flag I've ever seen, I don't know what is. I ain't touching that.
-----------------------------------
Anyways, my preferred solution:
Have a way to "pause" a tab by "converting" a page into a simple screenshot. You click a button, the browser automatically takes a screenshot of the page, and displays it as such. All other memory or CPU requirements are killed. I don't need each of my 20 wiki pages to constantly be running muted videos/ads when I access them (and maybe even in the background? I wouldn't put it past them), I just need them to display text and look as pretty as they did when I first loaded them. If I want to access the actual page again, I can just hit the "reload" button and it reloads the actual web page again.
Quirks:
I imagine this wouldn't be very compatible with resizing the browser window. I don't care. If I care, I can reload & pause it again at the new size.
Maybe we'd still want page links to work, so even on a "paused"/"screenshotted" page I can still click a link and then the next page is accessed as normal. I'm sure this would be extremely easy to implement - if adblockers can detect specifically ads and block them, I'm sure this "pause" feature can detect text/image links and overlay clickable zones onto a PNG.
Maybe this could conflict with logins? But I highly doubt that, and even if so, I'm the one choosing to pause the page - I'll relog if I have to when I get back to the real website.
Questions:
Is this unfeasible for some reason?
Does something like this exist and I'm just ignorant?
Why doesn't every browser include this kind of thing as a baseline option? Is the use case too narrow? Are the browser companies too symbiotic with sneaky advertising to allow for this?
Thanks!