Hacker News new | ask | show | jobs
by r721 776 days ago
>A Mozilla rep confirms to PCMag that having tons of Firefox tabs open consumes "practically no memory whatsoever."

So they are not that different from bookmarks then?

4 comments

They consume more than bookmarks because they have the current page content and context and the navigation history. Firefox does a good job minimizing the memory this takes, but it's non-zero. For that reason I rarely go above about 400 tabs in a session. My wife, on the other hand, is OK with swap to a fast SSD that I'm not OK with and has several thousand tabs loaded at any given time.
My 100+ tabs consuming 12GB of RAM says otherwise...
That's because of the Javascript running on them. If I have a dozen youtube tabs that are not suspended my FF becomes very janky and if I look in FF task manager, sure enough, they're consuming lots of CPU. I suspend them and FF becomes snappier again.
> suspend

Right, but the article says nothing about suspending and seems to strongly suggest that tabs take "no ram at all" by default, which is just plain false, unless I'm misunderstanding something. I don't even see a way to suspend tabs without a separate extension.

There is also an unfair comparison made in the article.

> A quick PCMag test shows that 10 Chrome tabs on a Windows 11 PC with 32GB of RAM and 2TB of NVMe SSD storage take up over 2,000MB, or 12.5% of PC memory, so there's still room for improvement (Hazel's massive Firefox session file is just 70MB).

Taking up nearly 2GB of RAM for 10 tabs sucks, but they seem to be comparing the size of the session on disk to the resident size of the loaded browser in memory, of course the memory footprint is going to blow it away.

well i have 4600 tabs, 13 windows, 18 tab groups and 130 firefox processes. htop shows me that while each browser process has about 3GB of virtual memory, all of them barely register any real memory use. so as far as i can tell, tabs do not use any memory.
Ok but those tabs would have to be suspended for them to not use "any" memory.
right, most tabs are suspended. i also use an extension that automatically suspends inactive tabs, so i don't have more than 20 or 30 tabs that are not suspended.
Close Firefox then restore your session. Until you switch to a tab, it stays unloaded and consumes nearly no resources. The tab does stay resident in memory until you restart again, or otherwise suspend it.
I upgraded from 16gb to 32gb of RAM expressly because of firefox.
And the saying used to be that Chrome was the chief RAM gobbler of most users' PCs. :)
A fully rendered modern webpage is BIG - no matter what engine rendered it.

IIRC both current big engines drop the rendered state in the background under memory pressure, as it's pretty much the only way of dealing with it.

Chrome is actually pretty good at dehydrating and rehydrating tabs on demand these days, at least in my experience.
Same here. What are the chances of that Mozilla rep actually using Chrome (which actually does auto-unload tabs these days)?
Then why does my firefox freeze my comp if I have too many tabs open?
You can have thousands of unloaded tabs, but loaded tabs can gobble up memory and your computer may start swapping. It will usually recover from that but it can take a minute or two. If you get that often, you can open about:processes , sort on memory use and kill a few of the largest processes, which will unload their tabs.
The tabs are open but not loaded so yeah, it's like a bookmark. Once you click the tab it loads the content.
I thought you needed an extension to unload tabs?
Just quit firefox and restore tabs on restart, all of the tabs are now unloaded but still present in the tab bar.
about:processes can kill processes, which will unload their tabs.