Live data from Hacker News

Ask HN: One tab on Chrome takes about 100MB memory, why?

news.ycombinator.com

91–100 of 210 posts

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#91
Try TidyTab, https://github.com/eggplanetio/tidytab. Added benefits are it's a lot lighter and you get to sync your bookmarks across your devices. I was a longtime OneTab user and I suggested several features to the developer to make it just about the same feature wise for anyone migrating.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#92
post #90
post #66

Earlier quoted context omitted.

The OS should use all available RAM it practically can for things like cache. Not the applications.

That may not actually be a practical approach to the problem. Years (and jobs) ago, we rolled significant caching into Vegas (video editor), allowing the app to take up 8GB of RAM in cached frames, even on 32-bit builds. There was no way for the OS to do this sort of work for us. The best that the operating system would have been able to do would have been to cache file reads for us. Caching the output of computation…

You're talking about a professional software suite meant to work on workstations often solely meant to run that suite.

Chrome has to cooperatively share resources with other applications and with aggressive caching at application level, the only strategy at hands of the OS is to start swapping.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#93

In modern days, it is usually a web page / app, who takes memory, not the browser environment itself. E.g. I am developing a web photo editor https://www.Photopea.com . When you open large documents (dozens of layers in high resolution), it can use 4 GB of RAM or even more. That is simply because decompressed images are large. No matter what browser you use. But I am still shocked about the memory requirements of som…

GMail has a ton of Javascript. The basic HTML interface uses closer to 10MB (a bit tricky for me to measure in Firefox, since it doesn't use one process per tab)

And what functionality does it provide for that tons of javascript? I am asking honestly because most of the magic of gmail (which I love) is on the server side. The functionality that it has on the client side is trivial and in some cases atrocious. In these days it cannot even resize the compose box. The power of it's search bar should require trivial amount of client side code, so should the auto save. The only thing that should take up memory is client side caching of inbox which is primarily text.

What I'm missing here I'm honestly totally confused.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#94
post #83

Well, here is one thing I observed. Chrome allocates different process for every tab. Firefox doesn't do that. Just one process for all tab. Suppose I open 10 tabs each on Chrome & Firefox. And suppose every tab needs 100MB of memory. If you look up in task manager - Chrome - 10 tabs - 10 different process - 100MB each = 1000MB = roughly 1GB Firefox - 10 tabs - only 1 process - 1000MB = roughly 1GB for that one proce…

Sounds like your Firefox version is out of date. Multi process Firefox has landed quite a while ago, with different memory and performance characteristics.

I'll check.

Guess Firefox copied this feature from Chrome.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#95
post #14

Earlier quoted context omitted.

1 is entirely possible. Opera 12.x takes ~3-10MB per TAB (+the weight of the media used on the page). There is zero latency, opening new/switching tabs is instantaneous. Google devs use 16-32 core machines, often with hundreds of gigabytes ram. Why would they bother optimizing?

this is supposed to be exaggerated but who the fuck uses a 32 core computer with hundreds for gigabytes of ram. Do you mean their data centers?

Most amazon employees now use ec2 instances as their development environment so using a x1e.32xlarge with 128 vCPU's (64 cores over 4 sockets), 3,904 GiB of memory, 2 x 1,920 NVMe GB drives, and 14,000 Mbps of EBS bandwidth is possible.

Granted, I don't know anyone that uses that much and you would probably get asked by management for using a dev desktop that big but you can if you need to. I myself use just a i3.xlarge with 4 vCPU's, 30.5 or memory, Up to 10 Gigabit of EBS storage and 1 x 0.95 NVMe SSD.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#96
post #67
post #14

Earlier quoted context omitted.

1 is entirely possible. Opera 12.x takes ~3-10MB per TAB (+the weight of the media used on the page). There is zero latency, opening new/switching tabs is instantaneous. Google devs use 16-32 core machines, often with hundreds of gigabytes ram. Why would they bother optimizing?

>Google devs use 16-32 core machines, often with hundreds of gigabytes ram You obviously have no idea what you are talking about. Most devs at Google use MacBook Pros.. which cannot even be upgraded to hold hundreds of gigs of ram.

Chrome devs are given both a laptop (most choose a MacBook Pro) and a fairly beefy desktop. My one had 64G of RAM, and that was given to me six years ago.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#97

Earlier quoted context omitted.

The standard machine has 32 GB. So I guess 0.32 hundreds... And for completeness, 6 physical cores, 12 logical with HT. Still beefy, but nothing out of the ordinary.

You are so wrong. Check here http://store.steampowered.com/hwsurvey/ these are gaming, most powerful PCs people are using. 8gb is 44% of all users.

>most powerful PCs people are using

No, workstations and\or graphical stations are powerfull. Gaming rigs can be powerfull, but most of the time they are average or just above average.

Also - steam statistic will show you a great number of PCs that are being used only to play some indie games and\or Dota. 8gb is more than enough for that.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#98
post #93

Earlier quoted context omitted.

GMail has a ton of Javascript. The basic HTML interface uses closer to 10MB (a bit tricky for me to measure in Firefox, since it doesn't use one process per tab)

And what functionality does it provide for that tons of javascript? I am asking honestly because most of the magic of gmail (which I love) is on the server side. The functionality that it has on the client side is trivial and in some cases atrocious. In these days it cannot even resize the compose box. The power of it's search bar should require trivial amount of client side code, so should the auto save. The only th…

(Key point: Gmail uses over 100MB where FastMail uses 10MB. Careful engineering helps a lot.)

Gmail provides a lot more functionality with that JavaScript than you may think. There’s a fair bit of magic that goes into making an email client work as you want it to.

That being said: most web apps are surprisingly inefficient in their memory usage (I find it surprising, anyway), and Gmail is no exception. I last used Gmail a bit over a year ago on Firefox, and it tended to start at about 60MB of explicit allocations, and work its way up to about 110MB. (Chrome being generally less memory-efficient than Firefox at present, I understand that figure to generally be two or three times as much.)

But a good email client doesn’t need to be like that; compare FastMail (which company I work for, but this aspect of the design and awareness of memory consumption happened long before I joined): the current explicit allocations on my two FastMail sessions are: 10MB for my work account (mail, open for several days and used plenty), and 27MB for my personal account (mail has been open for a few days and used plenty, and then I just opened calendar, contacts, notes, files and settings, so that all the code for all of them is loaded and all their views initialised, and let it settle down from 53MB to 27MB).

A lot of these things come down to having people care about performance (time, memory or whatever axis you like). Having a large team often makes it harder to get right too.

Almost all news sites, even many blogs and should-be-very-bland web pages use more memory than FastMail.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#99
post #22
post #19

Earlier quoted context omitted.

Yes, absolutely. I've had Chrome tabs take an inordinate amount of RAM and CPU and make the fans spin up. Enough so that other things were slow.

> inordinate amount of RAM and CPU and make the fans spin up I almost always find that this is caused by a badly behaved website, not Chrome itself. Some sites have horribly written JavaScript, or introduce ads that run their own CPU- and memory-intensive JavaScript. Finding and closing those tabs, or disabling JavaScript, or using uBlock or uMatrix usually solves it for me.

I find that a long-running Chrome instance will often start using huge amount of CPU time for no good reason (the Chrome task manager currently reports the "Browser" task is using 110% CPU and has used over 18hrs CPU time for my current instance). I've observed this on three different machines, one of which isn't used by me so there shouldn't be too much overlap in terms of sites used etc.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#100
post #87

To my overly long TODO-list I added a web browser project. I would like to see something akin to Links [0] or Lynx [1] with a bit of Dillo [2], but also for mobile. Features & non-features: - it would generally work like the reader mode (no other modes) trying to place navigation links in a predictable place - user can easily select text size and color schemes - night mode (Android does not have one) - because of it'…

What's the use of night mode? Even if someone needs to browse web in the darkness (which is a bad idea anyway), it should be implemented somewhere in the OS, not in applications.
Post reply on HN