Firefox had been underperforming during part of its life, but deep internal improvements meant those days are over. There is a huge difference in memory and CPU usage between older Firefox and the one we have today. Sadly, lots of people still think that Firefox never changed.
I did a quick memory usage test, just for having my personal anecdote and some numbers to show. The result was that Firefox uses an average of 10 MiB for each open (and active) tab. Not bad at all!
First, what I'm testing:
* Firefox 115, on Linux Mint 20.3 (which essentially is Ubuntu 20.04).
* 13 extensions installed. Some are uBlock Origin, Amazon Unsponsor, Bookmark Search Plus, DeArrow, Multi-Account Containers, Keepa, One-Click Wayback, Tree Style Tab (guys try this one out for a great vertical tab tree!).
* 90 tabs open. Tree Style Tab makes me open lots of tabs, because it is then so convenient to open/close subtrees for different topics... but I digress.
* Tabs include: 4 videogame stores, which are heavy on graphics and dynamic content. 10 shopping tabs in various shops, including Amazon. 10 YouTube videos (buffering preloaded). 14 Google Drive / Google Docs tabs (heavy on JS usage). Various documentation pages, and too many HN threads to admit.
* Firefox configured to remember all tabs when closed, and restore them when opening. Upon firstly starting, Firefox doesn't actually load the tabs. They are in suspended, inactive state, until opened for the first time.
RAM usage results:
* Cleanly started, only HN frontpage loaded: 372 MiB.
* HN frontpage and this entry opened in tabs: 386 MiB.
* Third HN tab opened: 394 MiB.
* Went through ALL 90 tabs to force them loading: 954 MiB.
Conclusion: Firefox uses around 10 MiB per loaded tab.
(The reason for this post is all those comments here and in other entries, claiming that Firefox was a resource hog for them a while ago, and that's why they nowadays are committed Chrome users. In light of recent events, we really need to collectively reduce Chrome usage numbers!)
> HN frontpage and this entry opened in tabs: 386 MiB.
Am I the only one who still remembers when high-end desktop computers came with 128 MiB of RAM or less? Using three times that, with just a couple of tabs from a very light site like this one, feels like a lot of memory usage.
(I have used Firefox's ancestor on a computer with 8 MiB of RAM, so needing hundreds of megabytes just to start the browser already feels crazy to me in the first place.)
I do remember those times :-) and I guess back then, memory was a free-for-all wild west of direct access and no protections whatsoever...
Today, you're using a much more developed 64-bit architecture. On that, an OS that attempts to protect applications from each other (I'm thinking of ASLR but there are maybe more mechanisms). On that, a web browser that creates and manages multi-process working arenas (sandboxes) to protect tabs from each other. On that, add-ons that load in memory thousands of block rules (I mean uBlock), to protect users from commercial incentives of providers.
All that stack must be difficult to bring up with just 8 MiB of RAM :-) (probably the ad blocker alone needs more than that)
An additional test that may be worth trying out is BrowserBench [1] Varies heavily by computer specs. My daily driver is an ancient PC running Linux still fast enough for me but my newer mini-PC's leave this old thing in the dust regardless of what browser I use.
* Chromium without uBlock (only addon installed): 150
* Edge 109: 122
Which means that all are in the same ballpark. I feel this test is more about CPU. It is also constantly (re)loading contents from browserbench.org, which tells me that the test itself might be very sensible to (and thus invalidated by) the network conditions at the moment of the test. Should be easy and would be much more reliable to preload all assets, and then do the benchmark.
EDIT: Adding values without uBlock Origin and without all extensions. We can see how having to parse all pages to check if there are elements to block, has its toll in CPU usage in the benchmark. For real-world cases of less CPU-intensive web browsing, blocking unwanted elements is immensely worth it.
I did a quick memory usage test, just for having my personal anecdote and some numbers to show. The result was that Firefox uses an average of 10 MiB for each open (and active) tab. Not bad at all!
First, what I'm testing:
* Firefox 115, on Linux Mint 20.3 (which essentially is Ubuntu 20.04).
* 13 extensions installed. Some are uBlock Origin, Amazon Unsponsor, Bookmark Search Plus, DeArrow, Multi-Account Containers, Keepa, One-Click Wayback, Tree Style Tab (guys try this one out for a great vertical tab tree!).
* 90 tabs open. Tree Style Tab makes me open lots of tabs, because it is then so convenient to open/close subtrees for different topics... but I digress.
* Tabs include: 4 videogame stores, which are heavy on graphics and dynamic content. 10 shopping tabs in various shops, including Amazon. 10 YouTube videos (buffering preloaded). 14 Google Drive / Google Docs tabs (heavy on JS usage). Various documentation pages, and too many HN threads to admit.
* Firefox configured to remember all tabs when closed, and restore them when opening. Upon firstly starting, Firefox doesn't actually load the tabs. They are in suspended, inactive state, until opened for the first time.
RAM usage results:
* Cleanly started, only HN frontpage loaded: 372 MiB.
* HN frontpage and this entry opened in tabs: 386 MiB.
* Third HN tab opened: 394 MiB.
* Went through ALL 90 tabs to force them loading: 954 MiB.
Conclusion: Firefox uses around 10 MiB per loaded tab.
Screenshots of Btop++:
* In the middle of loading all 90 tabs. CPU is busy! https://pasteboard.co/Bxf2TI9P8YT2.png
* After all tabs have been successfully loaded. Resource usage is back to being stationary. https://pasteboard.co/m3tVzYNMtDmD.png
(The reason for this post is all those comments here and in other entries, claiming that Firefox was a resource hog for them a while ago, and that's why they nowadays are committed Chrome users. In light of recent events, we really need to collectively reduce Chrome usage numbers!)