I've dipped my toe back into the world of Chromium browsers lately and it has led me to being quite unimpressed with Safari's memory management.
I did a very simple test with four browsers. Safari and Helium were originally the two I was comparing but I also brought in Orion and Vivaldi for further comparison. The test is three pinned tabs -- Glance homepage, protonmail inbox, and linkwarden -- with a fourth tab sitting on the default landing page for the respective browser. I used btop to monitor memory usage for the processes spawned by the browsers.
Starting with Safari btop shows it using over 5GB all on its lonesome, seen in the screenshot below.
Now maybe you're thinking that Chrome is a famously heavy browser, or Chromium is a famously heavy browser engine, but in this next screenshot we see a significant decrease in memory usage under Chromium.
Chrome is using less than half the amount of memory that Safari was using for, it bears repeating, the same tabs.
Here I thought that maybe Helium was particularly light so I brought in Vivaldi as it has more features built in, and I have seen some complain about browser performance with Vivaldi.
Vivaldi was using more memory than Helium but it is worth noting that it was still using less than half the memory of Safari.
I don't want to say Apple is lying about how much memory Safari uses but it is worth noting that the memory usage recorded in Activity Monitor differs significantly from what is recorded in btop.
I had to filter for Safari in Activity Monitor since it wouldn't allow me to search for WebKit. Rough math puts memory usage for Safari when looking at btop at around 5.2GB and ~1GB when looking at Activity Monitor. When doing the same with Vivaldi or Helium the numbers in Activity Monitor are pretty close to what is shown in btop.
During my little test I brought in Orion at the point of seeing this discrepancy between Activity Monitor and btop as a sanity check.
Orion is using way less memory than Safari! So it does not appear that the memory usage in Safari in inherit to WebKit. There are some clear differences we can see between Activity Monitor and btop regarding how they measure memory usage but that itself does not explain a multi-GB difference seen with Safari.
Having said all this, after the test memory usage in Safari did go down. Perhaps this had more to do with aggressive caching than straight-up memory usage? I'd be interested if anyone had insight on how Safari uses memory. With 32GB in my M4 mini I am not hurting for memory but for people with lower memory configurations this sort of thing will be more important to them.
I did a very simple test with four browsers. Safari and Helium were originally the two I was comparing but I also brought in Orion and Vivaldi for further comparison. The test is three pinned tabs -- Glance homepage, protonmail inbox, and linkwarden -- with a fourth tab sitting on the default landing page for the respective browser. I used btop to monitor memory usage for the processes spawned by the browsers.
Starting with Safari btop shows it using over 5GB all on its lonesome, seen in the screenshot below.
Now maybe you're thinking that Chrome is a famously heavy browser, or Chromium is a famously heavy browser engine, but in this next screenshot we see a significant decrease in memory usage under Chromium.
Chrome is using less than half the amount of memory that Safari was using for, it bears repeating, the same tabs.
Here I thought that maybe Helium was particularly light so I brought in Vivaldi as it has more features built in, and I have seen some complain about browser performance with Vivaldi.
Vivaldi was using more memory than Helium but it is worth noting that it was still using less than half the memory of Safari.
I don't want to say Apple is lying about how much memory Safari uses but it is worth noting that the memory usage recorded in Activity Monitor differs significantly from what is recorded in btop.
I had to filter for Safari in Activity Monitor since it wouldn't allow me to search for WebKit. Rough math puts memory usage for Safari when looking at btop at around 5.2GB and ~1GB when looking at Activity Monitor. When doing the same with Vivaldi or Helium the numbers in Activity Monitor are pretty close to what is shown in btop.
During my little test I brought in Orion at the point of seeing this discrepancy between Activity Monitor and btop as a sanity check.
Orion is using way less memory than Safari! So it does not appear that the memory usage in Safari in inherit to WebKit. There are some clear differences we can see between Activity Monitor and btop regarding how they measure memory usage but that itself does not explain a multi-GB difference seen with Safari.
Having said all this, after the test memory usage in Safari did go down. Perhaps this had more to do with aggressive caching than straight-up memory usage? I'd be interested if anyone had insight on how Safari uses memory. With 32GB in my M4 mini I am not hurting for memory but for people with lower memory configurations this sort of thing will be more important to them.