Ask HN: Why is Chromium a memory hog? Why can't we fix it?

5 points by rco8786 ↗ HN
Hoping someone with some architectural knowledge of Chromium can jump in here. I am mainly asking out of curiosity, as other browsers don't seem to suffer from memory bloat in the same order of magnitude.

So, what is it about Chromium that causes it to suck up so much memory? What is difficult about fixing this?

As a further niche, I'm also interested in this from Electron's PoV.

7 comments

[ 2.9 ms ] story [ 26.6 ms ] thread
Recently we published an article on this - Why chrome consumes so much memory compared to other browsers. Do let me know if it was helpful! here is the link - https://blog.neverinstall.com/the-curious-case-of-chromes-co...
This does help some, but I am hoping to get some more internal details. The article seems to focus on the number of child processes that Chrome spins off, but multiple processes does not automatically mean bloat. All the major browsers that I am aware of also use a process-per-tab approach, but don't seem to have the memory issues to the same extent as Chrome.

This also kind of hints at my follow up question around Electron. Electron just uses 2 processes, one Chromium and one Nodejs, but still it has memory problems.

edit Oddly enough I just went and looked. Both Slack and VSCode (electron apps) are actually consuming a relatively reasonable amount of memory (on the order of 100s of MBs each) on my Macbook. Maybe some progress has been quietly made in this area, specific to Electron? Or maybe I'm just desensitized to apps taking up 100s of MBs

I have fairly capable machines that can handle Chrome. I don’t have several apps running in the background and prefer to just have a browser open so I can focus. 32GB RAM is sufficient, plus a fast SSD. You don’t get to complain when you have the right hardware. I can see why running Chrome on a Raspberry Pi would be a problem though.
I’m not complaining nor judging. I’m asking a technical question about why a piece of software uses significantly more memory than other similar pieces of software.

Also not everyone has 32G of memory. Most mid range laptops have 8 or 16.

Browsers do a lot of things simultaneously. They come bundled with devtools, codecs, have to render different file formats like PDF, need to sync bookmarks across devices, play video, handle JS APIs, do security right, etc A browser is the most complex piece of software on your system, apart from the OS.
Thanks. I am looking for a technical discussion about why Chromium seems to be more memory intensive than other browser cores while being responsible for largely the same application functionality. Is this not clear from the question? Is there something I can reword to make it clearer?