Why are modern browsers using so much memory?

TheGardenTool

2[H]4U
Joined
Mar 12, 2006
Messages
3,814
So I dug out my ancient Dell XPS M140 the other day to pull off some old files that weren't backed up anywhere else. I decided to clean up the hard drive by deleting files and programs I didn't need anymore. I also decided to download and install over 150 Windows updates from 2009, the last time the notebook was connected to the internet, until present. I'm hoping to be able to use the notebook in lieu of purchasing a second monitor so I can browse and what not while having a full screen game or other program open on the desktop.

I updated Firefox from 3.something from 2009, the last time the notebook was seriously used, to the newest Firefox. With one tab open it was using over 100MB. Next I decided to try out Chrome for the first time and it's better with just over 40MB with only [H] open.

Why are these modern browsers using so much in resources without add-ons or anything else? Any suggestions on how to lower it?
 
Holy crap, I have 12 processes currently running on Chrome. I have 2 tabs open on one instance of the browser. :eek:

I think it's because of new caching technologies that use the GPU and memory to keep the browser fast for things like sites you visit often and so forth...pre-caching, etc.

Correct me if I'm wrong. I mean I have enough memory to handle it, but still.
 
Last edited:
as far as chome goes if you click the wrench on the upper right corner open the tool sub menu and click task manager chrome will tell you exactly how much each process and task chrome is using is taking memory wise.
 
Because they're suppose to? I mean RAM is meant to be used.

Though probably because of all the flash that websites are using these days.
 
Oh Danny but that's not really the answer I was hoping to get. I mean seriously [H]ardForum was taking up nearly 20MB by itself. I didn't even look at any threads with photos in them. I would image Flash was the reason when I took a look at the weather radar later to see if the damn storm was finished it jumped up to nearly 500MB usage.

I guess it's a moot point really as the notebook has 2GB and if I'm only using it for browsing right now it probably doesn't matter and if it gets too bad I'll look into installing some flavor of Unix or Linux on it.
 
cache, make things faster, lazy programmers....

software it seems is not like the hardware that gets smaller and faster, as hardware gets smaller and faster software is getting larger and more bloated, why FF has gone down hill trying to keep up with chrome on releases.
 
Holy crap, I have 12 processes currently running on Chrome. I have 2 tabs open on one instance of the browser. :eek:

I think it's because of new caching technologies that use the GPU and memory to keep the browser fast for things like sites you visit often and so forth...pre-caching, etc.

Correct me if I'm wrong. I mean I have enough memory to handle it, but still.

Chrome opens a new process for each addon you have running aswell, according to Google, this is to prevent the entire browser from crashing if one addon decides to shit itself.
 
cache, make things faster, lazy programmers....

software it seems is not like the hardware that gets smaller and faster, as hardware gets smaller and faster software is getting larger and more bloated, why FF has gone down hill trying to keep up with chrome on releases.

Firefox uses fewer resources then Chrome...
 
I guess it's a moot point really as the notebook has 2GB and if I'm only using it for browsing right now it probably doesn't matter and if it gets too bad I'll look into installing some flavor of Unix or Linux on it.

We get 1gb of RAM usage on Linux as well.
 
Computers are coming with much more memory, so why not use it? Unused ram is wasted ram.
 
Writing programs that can't clean up after themselves is not a useful way to "make use" of more ram.

I just had this happen last week, and I am doubtful this was being helpful:
iememoryusage.png


The 3.4gb process is Gmail in IE9.
 
Apps today are just coded more slopply. Instead of "How can I make this process more efficient instead of loading all of this in memory" they figure "screw it computers have lot of memory now, just load this all in memory and work with it, and just leave it there because we can".

Firefox is bad for that. The memory just grows and grows and grows. How much ram can it really take to render a web page, which is something that 486's used to be able to do fine when the internet just came out? Chrome is a bit more lightweight, unless that changed. Have not used it in a while.
 
Sometimes it's because of plugins, sometimes it's because the browser is bad at reclaiming memory, and sometimes it's due to bad caching. And to tell you the truth, a lot of the bloat as of late is due to focusing on speeding up things like Javascript and not accounting for wasted memory in the process.

Firefox is starting to make some serious progress in reducing usage 14 is going to be a major reduction. https://areweslimyet.com/
 
^^ The link posted above is the best reference for FF. The biggest offenders are plugins and Javascript. JS is problematic from an implementation perspective, because it requires a built-in JIT on modern browsers. JS is becoming ubiquitous, and users demand fast JS performance. There is basically an entire VM built in to web browsers these days.

HTML5 doesn't help either. It's a rich language with lots of media extensions, which browsers will soon have to support as well. I believe there is talk among developers to implement as much media processing in existing DLLs (like OpenGL, OpenCL, and other media libraries), but there is bound to be some stuff which must be implemented at the browser level.
 
Firefox uses fewer resources then Chrome...

4 same tabs open in each browser on H

chromeff.jpg


Firefox 11: 87,3804K
Chrome: 94,480K (when added up)

Firefox has 1 process running, if a site freezes it - it all crashes and now i have to hope firefox can restore those tabs, which more often than not i get the error it cant...

Chrome has 5 separate processes for each tab i have open, one crashes, only 1 crashes....

a whole 7Mb of ram......

Each browser was started clean. I also find FF slower and over time uses alot more RAM and has had some crappy performance with flash previously to the point flash is unviewable, like watching some 5 FPS a second video where IE and chrome were fine, seen this across several computers, also FF and has crashed far more often for me than Chrome ever has for me, i used to love FF but since about 3.5 /3.6? it has gone down hill for me considerably since they try to keep up with Chrome release schedule.
 
Because they're suppose to? I mean RAM is meant to be used.

Though probably because of all the flash that websites are using these days.

I didn't buy 8gb of ram for my operating system and programs to use it. This is bullshit.

;)
 
In the old days, programmers focused on fast code and small file size. These days, programmers care nothing about efficiency, except in special cases. Also, browsers have practically become virtual machines with their own operating system, making them necessarily large.

But, it does seem in recent months that browsers are getting bigger, faster.
 
I had to go back to my A64 rig for a couple weeks while waiting for an RMA and let me tell you.. using google chrome just about bullied the computer for all of its ram. Back in the day, I had experienced none of this memory hoggery.
 
While I've never seen FF at 3+GB, I have seen it at 1+GB before. Though closing it and opening (even all the same tabs) lowers that number drastically. Now I use Chrome and don't seem to have any issues. It also loads/opens noticeably faster.
 
4 same tabs open in each browser on H

chromeff.jpg


Firefox 11: 87,3804K
Chrome: 94,480K (when added up)

Firefox has 1 process running, if a site freezes it - it all crashes and now i have to hope firefox can restore those tabs, which more often than not i get the error it cant...

Chrome has 5 separate processes for each tab i have open, one crashes, only 1 crashes....

a whole 7Mb of ram......

Each browser was started clean. I also find FF slower and over time uses alot more RAM and has had some crappy performance with flash previously to the point flash is unviewable, like watching some 5 FPS a second video where IE and chrome were fine, seen this across several computers, also FF and has crashed far more often for me than Chrome ever has for me, i used to love FF but since about 3.5 /3.6? it has gone down hill for me considerably since they try to keep up with Chrome release schedule.

OK, you know you can't just add up the memory number from all the processes right?

Some of that memory is shared across the processes so you are double and triple counting some of the megabytes.

You need to go to chrome://memory and look at the private memory usage value to see the best measurement of how much ram is actually being used my Chrome.
 
There's a similar option in Firefox. about:memory . Sometimes it's pretty eye opening on what's actually is causing problems, often it's a plugin, not the browser itself.
 
In the old days, programmers focused on fast code and small file size. These days, programmers care nothing about efficiency, except in special cases.

Often true, but not always. There's also a common trade-off in low-level programming: memory usage vs speed. This goes back to the days where you had a few kb of RAM and is still very relevant. Faster algorithms often use more memory, slower ones, less. Less memory also meant loading less data in at once, sending you back to IO channels more often. The optimist in me hopes that as we get more RAM, it's being used to implement faster algorithms, being used to reduce cache misses, etc. and not merely being leaked to laziness. Although I'm sure there's plenty of that too.

+1 to browsers as JS virtual machines. Browsers are essentially the operating systems for today's applications, not mere HTML renderers.

Also, web pages themselves are now huge compared to the early days of the web, often coming with massive payloads of code, which in turn spawns data structures designed to optimize its execution. And images, videos, Flash/Silverlight/Java, all spawn libraries, codecs, runtime environments, in memory in addition to their own payload.
 
Browsers may be getting larger in terms of memory usage. But they have been getting faster and more efficient at javascript execution which helps speed up a lot of pages.

Memory usage of browsers isn't growing as fast as how much RAM has grown by.

FF 2.0 came out in 2006. Back then 2GB of ram was fairly common. Now, 8GB of RAM is really common and I'm pretty positive that FF 12 doesn't take 4x the RAM to do the same work that FF 2 did.

You have to factor in that web pages have gotten much larger since 2006 as well.

Someone do a comparison of typical 2012 websites running in FF2 and FF12.

I'm sure FF12 is a lot faster than FF2 because it's utilizing more RAM and has a much more efficient and refined javascript engine.
 
we don't talk about IE9 because it is horrible but I think optimizing ram is something all browers fight over, would be interesting to compare more than just firefox and chrome and then look at the processes that cause such high usage.
 
With traditional GUI programming, you would define three "kinds" of elements: first, static/unchanging parameters (window/form type, color, size, etc); second, dynamic parameters that can change (string in a particular text box); third, action parameters that are able to cause change (a button). This allows the representation of most application windows to be reduced to a small number of variables. Modern GUIs do allow mostly anything to be modified at runtime, but doing so would be considered poor programming practice.

Javascript/Ajax has nothing like this - literally anything on the page can change at any moment as a result of any event. Every element of the page - down to every last <div> tag and every character - really ought to be kept as its own individual object in memory in case it should be modified by an errant mouseover. You can delay creating objects until the last possible moment, but the later you create objects, the more likely you are to get caught with your pants down by some weird application that suddenly decides to change a bunch of functions that in turn dynamically generate and reorder a bunch of images.

We should be thankful that modern browsers use as little memory as they do.
 
IE is easily the worst when it comes to runaway memory usage and simply being wasteful. And this goes for IE9 as well as IE10 (in Windows 8) which is no better. Many times I've seen just a few tabs take IE over 500GB for no reason at all. Closing and reopening the exact same tabs and doing the same things often uses a lot less resources, which proves its just IE leaking memory.

You only have to look at mobile browsers (which for the most part will render nearly any page in full desktop compatibility mode, even with flash etc) to see that its not about web browser complexity, but the aggressive caching/optimization that desktop browsers do, and which is done in a way that uses tons of ram.

Due to the nature of the beast (DHTML), some claim that this memory can't be garbage collected without shutting down the entire browser, which IMO is not true at all. Some browsers (esp Firefox) are victims of their own extensibility and are hostage to plugins which they have no control over. Others (IE) are just poorly coded.
 
OK, you know you can't just add up the memory number from all the processes right?

Some of that memory is shared across the processes so you are double and triple counting some of the megabytes.

You need to go to chrome://memory and look at the private memory usage value to see the best measurement of how much ram is actually being used my Chrome.

good to know! didnt know about that
 
... Others (IE) are just poorly coded.[/QUOTE said:
I agree that IE6 and IE7 were pretty bad when compared to FF (at that time) -- but it is time to stop trashing IE. Microsoft really stepped up their game for IE9 -- in both performance AND standards. YMMV, but I can speak with some confidence as I've written tens of thousands of lines of javascript over the past 12+ years (and no, not all of it good) :D
 
I use three different browsers daily (some more than others). Here's my current usage as I type this.






Shrugs...
 
I would rather my browser be as fast as possible and take up as much RAM as it needed to do so.
 
Just because a lot of memory is being used doesn't mean that the software is bloated or full of memory leaks. These browsers cache a lot of data to make browsing faster. Chrome uses separate processes for each tab, which makes it use up a lot of memory. Browsers also happen to be faster now than they ever have been so I'm not going to complain.
 
I should add more to this discussion.

Another huge reason for why browsers are using more RAM today than they did a few years ago is because we simply have more RAM available.

It's actually by design that the more RAM you have, the more RAM the program is told to use. Usually developers will tell the program to allocate more RAM if there is plenty of free RAM. This eliminates more disk access and allows more things like tabs, extensions, and history to be stored in RAM during a browser session. All of this speeds up the browser.

RAM is super fast anyways. It can and will be de-allocated in microseconds or less when another process on the system needs access to more RAM.

People tend to confuse a programs RAM usage with how much RAM the program needs. It's not how much it needs, it's how much it's currently allocating though. It's entirely possible that the program actually only needs half of what it's currently using but since that extra RAM is available, the program might as well use it to provide whatever additional speed increases it can. At least until another program needs the RAM.

Unused RAM is wasted RAM.
 
Separate memory spaces are probably getting a lot of use to prevent cascade crashes, and I would assume they're allocating more than they need.
 
we don't talk about IE9 because it is horrible

In what way is IE9 "horrible"? Sure, it may not be as cutting edge as FF or Chrome, nor does it have a vast library of plug-ins...

...but seriously, horrible?


Maybe you meant to press the 6 or 7 keys instead of 9, right?
 
Oh Danny but that's not really the answer I was hoping to get. I mean seriously [H]ardForum was taking up nearly 20MB by itself. I didn't even look at any threads with photos in them. I would image Flash was the reason when I took a look at the weather radar later to see if the damn storm was finished it jumped up to nearly 500MB usage.

I guess it's a moot point really as the notebook has 2GB and if I'm only using it for browsing right now it probably doesn't matter and if it gets too bad I'll look into installing some flavor of Unix or Linux on it.

I think he is right though.

It would be interesting to use the browser on a computer with less RAM and see how it adjusts.

I feel like web browsers and other programs automatically adjust to how much RAM you have. The more that is available, the more caching, etc. is done in order to speed things up.
 
if it gets too bad I'll look into installing some flavor of Unix or Linux on it.

I use Arch Linux as my day-to-day operating system. Trust me, once you get a desktop environment, X, and all of that happy fun stuff installed, you're no better off. The browser still uses the same (or more) amount of RAM.
 
Back
Top