4 ms·
I’m constantly stunned by the fact that chrome basically allocated a gig of men to each open tab... Can anyone eli5 why this is? I typically have thirty tabs
by samstave 9y ago
I’m constantly stunned by the fact that chrome basically allocated a gig of men to each open tab...
Can anyone eli5 why this is?
I typically have thirty tabs open at any given time.
- sp332 9y agoAre you counting shared memory multiple times? Try hitting shift-esc in Chrome and checking the memory usage there. My heaviest tab (Gmail) is only around 250M. Edit: I mean most computers don't even have 30 GB of RAM, but if you do there's an easy way to check. Open a bunch of tabs and note your system's total RAM usage. Then close Chrome and see how much gets freed up. If it's 30GB then you have a problem :)
- danaliv 9y agoOnly 250M. ONLY 250M. Gives up and dies I don't mean to be dramatic but this is a huge part of the problem. How is it that the exact same application (email) ran perfectly well on systems with 1M of RAM (and no virtual memory!) and now it takes two-hundred-and-fifty-fucking-megs?
- sp332 9y agoBecause... it's not at all the same application? Email used to keep everything on disk and load up one message at a time. Now everything is on the server and has images embedded, so it all gets cached into RAM. If I switch to the "HTML version" of Gmail, the tab takes only 3MB to list my emails. There's also inflation of the content itself. That same HTML view uses over 100MB to render one email with a lot of pictures.
- geofft 9y agoWow - I was going to make a counterargument about how alpine is perfectly capable of keeping everything on disk (and how I usually don't care about images), but my alpine process, which has been running for a bit over a month and is connected via IMAP to a remote server with about 220,000 messages in the inbox, is using 250 MB virtual and 100 MB resident if I'm reading ps right. So maybe Gmail is actually pretty efficient!?
- sp332 9y agoI'm sure the Gmail Android app is nice and light. I'm guessing the RAM bloat in the browser is from the JIT keeping lots of profiling data and cached compiled code, which looks good in benchmarks but does get a little "heavy".
- mrob 9y agoFull Unicode support, including input methods for languages that can't be typed directly on a QWERTY keyboard, takes a lot more than 1MB. Seeing as most of the world's population doesn't speak English, this is a very important improvement.
- ziotom78 9y agoWell said.
- jononor 9y ago250MB is around 100'000 pages of text. Or some 150 full HD images. Why such amounts of data needs to be in memory at all times to read/reply to emails, I have no idea.
- varjag 9y agoEspecially when all heavy lifting is done on the server.
- Santosh83 9y agoIt's only the same functionality but not the same application. Mail clients of old were standalone compiled programs that only did one thing. A Chrome process is almost a mini operating system and API layer on top.
- digi_owl 9y agoA OS in a sandbox on top of an OS on top of an CPU...
- s73ver_ 9y agoIt was doing much, much, much less.
- danaliv 9y agoWas it though? Gmail is just a frontend to a system of services running in a data center. All Gmail does on our computers is display data, accept commands, and relay those commands to a server.
- s73ver_ 9y agoThat's a pretty gross oversimplification of things. One of the sibling comments has a pretty good comparison of what Gmail is doing that most 80s email clients weren't.
- spc476 9y agoI'm running mutt, and right now it's only consuming 8.5MB (out of an image size of 12MB). That still feels large to me, but my first computer had only 16K of RAM (I've written larger emails) so I might still have a bias.
- samstave 9y agoHmm... I may be - I’ll check when I get to work, I maybe have made a mindflake as I was pissed that chrome had so much allocated when it should be small given its job...
- debaserab2 9y agoTurns out building a standards compliant DOM rendering and JavaScript is actually pretty complex. When you throw in the heaps and heaps of different features that must follow volumes of specs, backwards compatibility with previous implementations, and cross platform compatibility I think it’s pretty safe to say that your average modern browser is one of the most, if not the most complex program installed on your machine. It’s job isn’t small at all.
- jkoll 9y ago250 megabytes for a simple email client.
- acdha 9y agoVersus, say, 1GB for Outlook and variable amounts for Mail.app depending on usage. It's not 1993 — these days email includes a full text search engine, rendering complex content, etc. Since even a phone comes with considerably more than 250MB of RAM, if you don't want to use the resources you paid for to make things faster or better, wouldn't that be an argument for using pine or mutt in a terminal window?
- pmlnr 9y agoThankfully on a webmail, these all happen on the server, not consuming client memory. Oh, wait.
- zeveb 9y ago> if you don't want to use the resources you paid for to make things faster or better, wouldn't that be an argument for using pine or mutt in a terminal window? I rather think that pine, mutt or gnus in a terminal window (or even X) would be faster and better than a web client. I read my mail in emacs using notmuch these days, and the full text search engine is a couple orders of magnitude faster than Google's Inbox; the complex content rendering is faster than Firefox or Chrome; everything is better and nothing is worse.
- samstave 9y agoOK checked. htop report that system idle with nothing running consumes 996MB mem -- one tab open in chrome jumps to 1.77GB (out of 16GB) now I have 6 open tabs... cnn, HN, reddit, reddit, reddit, netflix - and just to display these tabs its allocated 2.5 gigs... I just cant understand how displaying 6 websites requires 2.5GB of ram? Ill admit to being stupid on this topic - but I can maths, and that just doesnt appear to be logical - and I am not complaining, im trying to understand. So can anyone ELI5 why displaying the default pages of some of the fastest sites on the internet, reddit and hn, would consume the resources they do? im literally curious. http://i.imgur.com/Lm3iexB.jpg http://i.imgur.com/Lm3iexB.jpg WHY being the operable term here.. I just want to know WHY a browser is so mem intensive for displaying fucking text. The whole point was that in 1983, we had a VT100 or somesuch and they were fast as heck... but now I have to pre-load a shit-ton of ads or something that consume my local resources and ruin my experience? Do we need to punch a designer in the face? http://media.fakeposters.com/results/2009/07/16/z22e8wsvrf.jpg http://media.fakeposters.com/results/2009/07/16/z22e8wsvrf.j...
- sp332 9y agoSometimes being fast means using lots of RAM. https://hacks.mozilla.org/2017/10/the-whole-web-at-maximum-fps-how-webrender-gets-rid-of-jank/ https://hacks.mozilla.org/2017/10/the-whole-web-at-maximum-f...