ie8 fix
madison

Hardware 2.0

Adrian Kingsley-Hughes

Memory improvements coming to Firefox 7

By | July 6, 2011, 7:35am PDT

Summary: Firefox 5 might just be out of the gate, but Mozilla is working hard on improvements for Firefox 7. One of those improvements is the way that Firefox handles memory usage.

Firefox 5 might just be out of the gate, but Mozilla is working hard on improvements for Firefox 7. One of those improvements is the way that Firefox handles memory usage.

Firefox developer Nicholas Nethercote outlines some of the changes. The first is per-compartment reporters, which should help power users and ordinary users see what’s going on:

One nice thing about this feature is that it gives technically-oriented users a way to tell which web sites are causing high memory usage. This may help with perception, too; people might think “geez, Facebook is using a lot of memory” instead of “geez, Firefox is using a lot of memory”.

Along with per-compartment reporters comes dramatic improvements to the JavaScript heap fragmentation:

… in short, the size of the heap was over 5x smaller (21MB vs. 108MB) after closing a number of tabs and forcing garbage collection. Even if you don’t force garbage collection, it still helps greatly, because garbage collection happens periodically anyway, and longer browsing sessions will benefit more than shorter sessions.

This change will help everyday browsing a lot. It will also help with the perception of Firefox’s memory usage - once you learn about about:memory, an obvious thing to try is to browse for a while, close all tabs, and see what the memory usage looks like.

Poll

Does Firefox user too much memory?

I come across a lot of people complaining about how Firefox uses memory, so this will come as welcome news to them.

What’s interesting here is the two-fold approach that Mozilla is taking. It’s been a long-standing complaint leveled against Firefox that the browser uses too much memory and that it doesn’t release memory efficiently when tabs are closed. Here Mozilla are not only working hard to shrink the amount of memory Firefox uses, but also giving users the tools to see how much memory the browser is using, along with the all-important ‘why’ it is using that memory.

What else should Mozilla be working on for Firefox 7?

Kick off your day with ZDNet's daily e-mail newsletter. It's the freshest tech news and opinion, served hot. Get it.

Topics

Adrian Kingsley-Hughes is an internationally published technology author who has devoted over a decade to helping users get the most from technology.

Disclosure

Adrian Kingsley-Hughes

All opinions expressed on Hardware 2.0 are those of Adrian Kingsley-Hughes. Every effort is made to ensure that the information posted is accurate. If you have any comments, queries or corrections, please contact Adrian via the email link here. Any possible conflicts of interest will be posted below. [Updated: February 23, 2010] - Adrian Kingsley-Hughes has no business relationships, affiliations, investments, or other actual/potential conflicts of interest relating to the content posted so far on this blog.

Biography

Adrian Kingsley-Hughes

Adrian Kingsley-Hughes is an internationally published technology author who has devoted over a decade to helping users get the most from technology -- whether that be by learning to program, building a PC from a pile of parts, or helping them get the most from their new MP3 player or digital camera.

Adrian has authored/co-authored technical books on a variety of topics, ranging from programming to building and maintaining PCs. His most recent books include "Build the Ultimate Custom PC", "Beginning Programming" and "The PC Doctor's Fix It Yourself Guide". He has also written training manuals that have been used by a number of Fortune 500 companies.

Adrian also runs a popular blog under the name The PC Doctor, where he covers a range of computer-related topics -- from security to repairing and upgrading.

74
Comments

Join the conversation!

Just In

RE: Memory improvements coming to Firefox 7
davidhouwid Updated - 20th Feb
@DeRSSS good info ok! Thnx a lot for your piece, i found a little distinct angle at http://edproblemsolver.com
Armel
0 Votes
+ -
I use Safari and only Safari
woulddie4apple 6th Jul
I'm tired of all these "me-too" browsers that can't do anything but copy Safari.
0 Votes
+ -
Troll
DeRSSS 6th Jul
@woulddie4apple
0 Votes
+ -
Troll
woulddie4apple 6th Jul
@DeRSSS
  • Flagged
0 Votes
+ -
RE: Memory improvements coming to Firefox 7
davidhouwid Updated - 20th Feb
@DeRSSS good info ok! Thnx a lot for your piece, i found a little distinct angle at http://edproblemsolver.com
Armel
0 Votes
+ -
Safari, the upstart
wls 6th Jul
@woulddie4apple, how could you be tired of "me-too" browsers if all you use is Safari? And about the "copy Safari" myth, Firefox launched in 2003. Its predecessor, Netscape released in 1994. Or maybe it is IE that you are in a snit over. IE was birthed in 1995. Whereas, the MS version of Safari didn't show up until 2007. And I suppose your granddaddy learned everything he ever knew from you?
0 Votes
+ -
Big difference
woulddie4apple Updated - 6th Jul
@wls
Apple released the first USABLE browser. Before Safari, no one used browsers because they were so complex. It took Apple to analyze the market and build the first truly capable, easy to use browser. Apple didn't invent the browser but they popularized it.
@Big difference

How wrong you are. If that was true than Safari would have been THE most popular browser ever. When it is less than 5% I think and always has been. Nothing was ever introduced in Safari that was revolutionary.
@woulddie4apple Safari IS A COPY OF Konqueror, the KDE-based browser. As a matter of fact, it's MADE FROM it. YOU, sir, are a TROLL.
@thombone You must be new here. Of course he's a troll. Sadly, the quality of his trolling has been going down rapidly. I think it's time for a summer vacation. There's a fine line between humorous and childish.
@thombone

Please don't feed the Trolls.
@woulddie4apple huh. I never used that. mosaic then netscape then mozilla firefox. What's this safari thing?
0 Votes
+ -
@woulddie4apple
Real TIRED DUDE! Stick to the subject please?
I am pretty sure that objective comparisons of memory usage between FF, Chrome and IE indicate that they are all roughly on par. That doesn't mean FF isn't memory hungry, it just means that all state of the art browsers are.
0 Votes
+ -
RE: Memory improvements coming to Firefox 7
OffsideInVancouver 6th Jul
@jdakula

I'd disagree with you, I use FF, IE and a Chrome variant called Iron regularly and although overall I prefer FF it slows down noticeably more than the others during long browsing sessions.

The counter arguement of course is that I should probably have something more worthwhile to do than browse the interwebz all day... :P
0 Votes
+ -
@jdakula Agreed! I only experience high memory in FF when I have a lot of tabs open (i.e. always wink I believe people didn't often hit memory usage in IE and Chrome as high as in Firefox simply because they're were so unusable with more than half a dozen tabs that people simply refrain from it.
It's been some months since I last used Chrome so I can't say about it, but IE9, which finally is usable with multiple tabs, is a sucker for memory.
0 Votes
+ -
RE: Memory improvements coming to Firefox 7
shellcodes_coder Updated - 6th Jul
That's not enough. If they want Chrome users to switch to Firefox, give us a sandbox. Both IE and Chrome have built-in sandbox and Firefox is the only browser (out of top 3 browsers) w/o sandbox. Heck, even IE 9 has a better download manager. Mozilla, it's time to innovate, if you keep sleeping then you guys will meet the fate of Netscape
@shellcodes_coder
Tried tab grouping? Thats innovative! WebGL? Audio authoring API?
0 Votes
+ -
@shellcodes_coder

I agree compeltely, sandboxing would be nice, and a better download manager (Download statusbar (an addon) is nice, why not make it default?). Does shaving a couple of extra meg off the memory usage really matter these days?

@przemoli

Didn't Opera have tab grouping before Firefox? I prefer Firefox, but I'm not sure that was a Firefox idea.
0 Votes
+ -
@shellcodes_coder
It's called "Add On's". Get "Sandboxie". Also recommend "TooManyTabs". Drops the open tabs from memory & into an easily retrieve menu drop down to recover them.
0 Votes
+ -
@NCIronMan I think so, if Firefox user need sandbox, just use Kaspersky, Avast(free) sandbox, or better, use Sandboxie xD~~
0 Votes
+ -
@shellcodes_coder I don't think sandbox is a good choice, sandbox make browser use much CPU and RAM, I disable sandbox on Google Chrome and it extreme fast!

I know that sandbox give to browser so much security but Firefox is security enough. And sandbox still get hacked.
0 Votes
+ -
Release schedule sucks
akaltman@... 6th Jul
If firefox ever pulls the same stunt with dropping support for a version 5 months after it was released, I'll move to Internet Explorer. I can't keep chasing these bizarre releases
@akaltman@...

then make it easy on yourself. Move to IE now and save yourself all the running around. You seem to blame Firefox for dropping the support, wouldn't it just be easier to drop Firefox?
@cboquin
Or turn on autoupdates, so you always have newest stuff, and do not have to chase anything....
@akaltman@... FF is going to the stupid update cycle to copy Chrome, who has been doing this for a long time, why is NO ONE slamming Chrome for updating to a new version every other month???
0 Votes
+ -
Jeez!
statuskwo5 6th Jul
What happened to version 6?
@statuskwo5 x2
@statuskwo5
The same as with 5 when was in beta. Major bux fixes, minor feature additions. Thats why this big new stuff lands in FF7.
@statuskwo5 That's what I was thinking X-D
0 Votes
+ -
RE: What happened to version 6?
fatman65535 7th Jul
@statuskwo5

It is in the pipeline, about to hit beta status, with version 7 approaching alpha status. And, those of us who like to live dangerously, and toying with version 8 (aka 'nightly').

Regarding those dramatic version number increases; they amount to just a pi$$ing contest, and marketing bulls---. Or as the girls would say: "Who has the bigger d---!"

Version 5 is really 4.1,
version 6 is really 4.2 (or 4.3),
version 7 is likely to amount to 4.4 (or 4.5), and
version 8 is, well I am not sure yet.

What has changed is that Mozilla is no longer holding back a major version change because some features could not land in time. This holding back, is one reason why Firefox 3, and later Firefox 4 took so long to arrive. Because of these delays, the instant gratification crowd started to complain about Firefox "falling behind". Mozilla decided to follow a schedule that Google uses, and drop releases on a tight schedule. if a planned feature is not ready, then it is either pulled or disabled, and work continues on it, until it is ready.

Now, with the accelerated release schedule, others, are complaining about the frequency of releases. It seems that you can't satisfy everybody.
0 Votes
+ -
Version 8
Greenknight_z 10th Jul
@fatman65535 - I'm running Nightly 8.0a1 right now, it has no major feature changes. While more changes will likely be checked in before it moves to the next level of test builds, I don't think there's anything big in the pipeline. Call it 4.5 or 4.6.
@statuskwo5

6 is next week, 7 the week after .... wink
0 Votes
+ -
Firefox is decent with memory but there is room for improvement. Now if you have flash running inside of Firefox then you will see that memory jump up pretty high. If Mozilla can fix the memory issues I will be one happy user.
0 Votes
+ -
A couple of ideas
kcredden2 6th Jul
#1: Get rid of this "6 month - drop ALL support for older versions" idea. This alone may drive me to Chrome. I won't infect my linux systems with IE. The main headache, is that add-ons cannot keep up, and I'm tired of loosing add-on support. At the moment, my policy is no upgrade past v4 IF an add-on doesn't support newer versions.

#2 Add-ons updating. Instead of updating the add-ons before the browser starts (which takes time I'd rather be doing like what I use FF for in the first place), give an alert, and let them update in the background, while I'm using FF I do that now myself. But It requires me to rescan for add-ons, tell it to update, then go back to what I'm doing.

#3 Memory - yes, that's critical. Even in linux, there is a noticeable reduction in memory over long periods.

#4: I hadn't reliezed that Chrome had a sandbox feature. If I was on Winders still, I'd move to Chrome quickly.

As a side note. Thank YOU for finally working out a solution to installing FF, and Thunderbird in linux. If it's not on a repository, then the solution (download the file, decompress it, then just put it anywhere and add a link) is fine. Installing programs is still about 80% good, 10% a pain in the rump.
0 Votes
+ -
UM chrome is like this as well...
Snooki_smoosh_smoosh 6th Jul
@kcredden2... Chrome just updates to the latest and greatest without warning. Which is fine for me, and probably most users, but if you are relying on proprietary extensions that take careful planning to update with browser versions, you may want to look elsewhere.
0 Votes
+ -
RE: Memory improvements coming to Firefox 7
Cattleya.vns Updated - 1st Aug
@Snooki_smoosh_smoosh But I do not like the way Google Chrome update, it install a plugin name "Google Update" to Firefox to update Chrome new version when using Firefox, make Firefox slow down by using so much RAM and CPU(for download and install), make some user think that Firefox bad, Firefox slow, Firefox use much CPU. A dirty trick. : (
@kcredden2
1. Chrome update more offten :/ And addons comparability will be adresed when all parts are in place.

2. Restartless adons updates are posible with Jetpack. Xulrunner addons need restart, and because they may need __critical security updates__ FF fetch updates before it starts properly.

3. We agree on that.

4. Yes Chrome have good sandbox. FF have sandbox for plugins, and with FF7 will have each tab in its own process, but I do not know if it counts as full sandbox.
0 Votes
+ -
Yes, I am aware of the new rapid release thing,,,
0 Votes
+ -
what about fixing the memory leaks problem which doesn't appear to be fixed in FF5????
@weber@...
In FF7 you as user will have better tools to catch them, reproduce them, and report lots of usefull info back to Mozilla.

It will massively speed up fixing those d*** leaks.
0 Votes
+ -
Worthless Problem
Yensi717 6th Jul
Are you really concerned with a browser using too much memory? Even the cheapest of computers are coming with 4GB of memory minimum. If your browser is taking up 200mb who cares? That's 4% of your total system memory. Unless you are running your computer at near capacity with applications running (and I highly doubt most people are) you won't even notice it.

I have right now running:

3 tabs of chrome
2 open IE windows
Outlook
Visual Studio 2010 (with a large project open)
Microsoft SQL Server
IIS 7
Antivirus

And I still have over 1GB of memory free for applications to use as needed (4GB on my computer). What's the point of having 4/6/8 GB of RAM in your computer if you never use it?
@Yensi717
32 bit OS's can use only ~700 phisical memory at given time, readdresing memory space is cheap, but still best to avoid.
@Yensi717 Modern OSes use the extra memory to cache disk access and leave libraries/files in memory that may be used again. Programs that waste memory mean there is less memory available for those purposes and system performance will suffer as a result.
@Yensi717 You realize Firefox bleeds memory like a drunken whale right? The longer it's up, the more memory it takes. It's not uncommon to see it at 300-500MB of memory used.
@Aerowind That's still less than all of the other major browsers though!
0 Votes
+ -
7??? Too little too late. It needs to be here NOW!
0 Votes
+ -
Good for them, and I am ok with the fast releases. Chrome is doing it, correct? You get more little updates at a quicker pace.

I am not a true blue fan of any browser, with the exception of just not liking IE at all...long story. But I was a FF user for many years, until I decided to try Chrome. But I was afraid to lose all my customizations and add-ons, but heard good things about it...fast, low memory usage and I tried it for nearly a year. Most add-ons were there, good update schedule, I liked it.

But I found out that Chrome eats up just as much memory. If you look at your task manager, yes, FF could take in the upper 6 digits of K in one process, but start adding all of the Chrome processes K's and it's about the same. Plus I am a many tab user and it was started hanging. Scrolling a page was delay for sometimes 10 seconds, the whole browser would even freeze and I would have to restart (and I thought it segregated processes to prevent this!).

So back I went to FF4.01 (hadn't use it since the early 3.x and now on FF5) and you know what...I found it to be just as fast rendering pages, no freezes as of yet, but yes lots of resources used, but my two laptops are equipped enough to handle it....so the memory fixes would be very welcome none the less.
Tests with Firefox 3.x by Toms Hardware showed that Firefox used much less memory per open tab than Chrome, especially on Linux. Chrome was the best at freeing memory, though. Firefox 4 seems to be using more memory, but that's just a subjective impression.

Opera is HORRIBLE at memory usage, however. Besides using much more memory under Linux than Windows, versions starting around 10 until the just-released 11.5 NEVER gave back ANY memory after tabs were closed. People who tried to bring this up on Opera's forum got their posts deleted by fan moderators who make Apple zealots seem unbiased in comparison. Because Opera's bug tracker is "secret", Opera never even confirmed bug submissions about this problem.

11.5 finally frees a small bit of memory when tabs are closed now, but in my testing I was still able to end up with a situation with no tabs open and 500MB memory usage after 10 minutes idle! It also apparently loads and keeps the "speed dial" web pages in memory, too, so starting Opera with no tabs open but 13 speed dial web pages results in 380MB memory usage on startup!

Opera's ridiculous inability to ever free memory finally made me switch to Firefox after being with Opera since the 1990s when it was paid software.

Even with the increase in memory usage in Firefox 4, it still uses less memory in my experience after a large number of tabs are open (Opera seems to hit a wall after which memory use balloons when each additional tab is opened).

I've never understood criticism of Firefox's memory usage given that real world tests show it uses less memory than other browsers.

In Tom's Hardware's memory comparison test of the browsers; Firefox 3.6 creams everyone when 40 tabs are opened: 260MB vs. 812MB for Safari, 855MB for Opera, 912MB for Chrome, and 1195MB for IE!

I doubt Firefox 4's figures have grown to 4X 3.6's memory usage, so there's no need for a poll: Firefox is the most memory-efficient browser of the major browsers, period, as confirmed by objective tests.

If memory performance is going to be BETTER than this in Firefox 7, I can hardly wait! As is, I'm able to use Firefox on a gifted antique 512MB laptop. happy
0 Votes
+ -
?geez, Facebook is using a lot of memory? instead of ?geez, Firefox is using a lot of memory?.

Really. Funny how Facebook (or whatever site) only uses a lot of memory on Firefox (or more specifically Firefox 4 and 5)

I'm less interested in which sites are using memory than in which parts of Firefox and Add-ons are using memory. These are things I can control. I can't control websites, other than simply not visiting them, and that's not an acceptable solution.
@rgcustomer@... The point is that you'll learn it's not Firefox that's using lots of memory - it's a specific poorly coded site or two.

Join the conversation!

Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]
ie8 fix
Click Here
ie8 fix

The best of ZDNet, delivered

ZDNet Newsletters

Get the best of ZDNet delivered straight to your inbox

Facebook Activity

White Papers, Webcasts, & Resources
ie8 fix
ie8 fix