"Closing a Browser", 2024

White ASCII on transparent canvas.

@fribbledom Not only memory. I left a browser with a few tabs open and some JS crap kept the CPU really busy.

@fribbledom It's so fucking annoying. Why they can't just put a memory limit in those things like any user-respecting app, I cannot fathom.

I'm only ever looking at a handful of tabs at the same time, for heaven's sake!

Firefox is particularly bad (can't say for other browsers) because they don't garbage-collect closed tabs. Not even when you _tell it to optimize_ on about memory! 🤬 It just keeps growing and growing until system memory is full -- and not even _then_ does it give way! AAARG!

@OmegaPolice @fribbledom i'm old enough to remember "we should all get rid of netscape because firefox is better at memory management"

now my 32G machine swaps everytime i change task

@aeduna @OmegaPolice @fribbledom Even at the time, that was a bit misleading. Mozilla Suite used less memory than Firefox + Thunderbird. The big advantage of Firefox was that the browser crashing (which happened at least once a day) didn't take out the mail client at the same time.
@OmegaPolice
Try this extension: https://addons.mozilla.org/en-US/firefox/addon/auto-tab-discard/
Firefox does some of it itself so I've never seen it grow indefinitely, but this one limits it further. I've configured it to only allow five tabs to remain active — probably not for everyone, but it works for me!
@fribbledom
Auto Tab Discard – Get this Extension for 🦊 Firefox (en-US)

Download Auto Tab Discard for Firefox. Increase browser speed and reduce memory load and when you have numerous open tabs.

@m0xee @fribbledom Is that different from "tab unloading"? 'Cause I already do that.

Simple observation: System memory 90% full. Close FF, open FF. Same tabs; fewer loaded, of course. Observable effect similar to OP. Then, over several days, usage grows.

I once found an issue comment stating that, indeed, they consider this a _feature_! Idle memory doesn't help anybody, after all, right? Better use it for good! Maybe I visit the same random page again this year! You never know! /s

@m0xee @fribbledom (That's me assuming they don't just have a straight-up memory leak.)

I _sort of_ follow the reasoning -- if they would ever release all that memory when it's needed. But nope. Restarting FF consistently brings back 10GB RAM (-ish) but, somehow, opening a second Miro board can freeze my entire machine.

Miro is a true memory sinner btw. Really, really awful. An empty board starts somewhere around 500GB, if I can trust FF to show meaningful numbers.

@OmegaPolice
Yes, it uses tab unloading, it just gives you more customisation and fine-grained control over it. I have to admit, I don't open many "heavy" website — could be the real reason I never experience these leaks, but the machine I'm typing this on is decade-old laptop with only 16 gigs of RAM, it has an uptime of over a month, I'm not certain that Firefox kept running the entire time though, but it currently has about two dozens of open tabs, most of which are unloaded and…
@fribbledom
@OmegaPolice
…it uses just about half a gigabyte of real RAM (resident, virtual memory allocated is still above 4 Gb of course) — as you can see, it's very modest, Thunderbird consumes more even when idle, and software based on webkit-gtk can consume about 2 Gb easily just after opening a couple of pages. I'm using Firefox in Void Linux and I stopped updating it at FF124 — could also be the reason why it's different here.
@OmegaPolice
I don't remember experiencing these insane leaks for quite some time already and AutoTabDiscard usually helps freeing lots of RAM, no need for a complete restart.

@m0xee The main different seems to be the sheer number of open (if unloaded) tabs I have. There are several dozen "resident" tabs at least, some of those huge-ass apps. 😅 I also create _many_ ephemeral tabs, probably hundreds each day.

For some reason, Firefox keeps data of unloaded and even _closed_ tabs in memory; at least that's the only explanation I can come up with for what I'm seeing.

I'll give that plugin a shot, thanks for the pointer!
I currently rely on the unloader addon of TabTree

@fribbledom It sounds ridiculous, but what else are you doing on your computer than browsing Facebook? Why would it not use all the RAM if that's all you do? 🤔😂
Btw, Chrome?

@lx

Nah, that's Firefox. Why it shouldn't use all my memory? Because it means it's fighting with the kernel over caching and freeing my memory. Which I typically need for other things than Facebook, really.

@fribbledom My post wasn't meant to be taken serious 😉 Do you feel the memory hog from Firefox or does the system still act fine?

@lx

Nah, to be honest it behaves just fine, and I have no issue with it using a sizeable amount of my memory. It's just that at some point it becomes a race between the kernel and Firefox thinking they both know better what to cache, and eventually that means you're constantly at the edge of OOM situations.

@fribbledom I never thought I would see OOM situations on a Linux desktop with 64GB of RAM, but here we are 😄
@fribbledom Stop calling it a browser – is this the 90ies?
You don‘t browse the web any longer. You go to the few big sites every day. Or to what some ad machine presents you as „search results“.
And your browser is not your browser any longer.
It is a VM that runs software you download without checks or version management from the internet. Don‘t call it a browser.

@goetz

Okokok, my Web-VM then... 🙄

@fribbledom For me, the most progressive browser remains the file browser.

@fribbledom I so hate it.
I shouldn't have to worry and manage my tabs, and worse, the whole app lifecycle because it can't manage itself.

I feel like I'm coding in C, managing memory instead of actually coding the app.

This sucks.

thx to uBlock and NoScript, my browser never takes this much memory. ;D