Does Firefox 7 solve the memory leak problem?

By Nick Mead on 25 August, 2011

The beta version of Firefox 7 for Windows and Mac is already out just days after the final release of Firefox 6. Mozilla claim that it features significant memory fixes that go a long way to solving the memory leak problem that is encouraging more and more Firefox users to switch to Chrome.

Firstly, it should be made clear that a memory leak is different to memory usage. A memory leak is when an application suddenly starts guzzling RAM for no apparent reason - as Firefox frequently does. Memory usage is simply the amount of RAM that an application needs to run.

I conducted a short simple experiment on a fresh install of both Firefox 6 and 7 without any add-ons installed. I opened the same 6 tabs in Firefox 6 and Firefox 7 Beta and observed their memory use over a 2 hour period. The results were enouraging. Although Firefox 7 Beta 1 still uses about as much memory as Firefox 6, it does appear to have largely solved the memory leaking problem.

The 6 tabs I opened in each browser were OnSoftware, Softonic, BBC, Microsoft, Apple and YouTube:

The memory use by Firefox 6 after opening them was 131,700K:

Compared to Firefox 7 Beta 1 which was slightly less at 112,768K:

I left them both running idly and checked 1 hour later. This is when the memory leak became apparent. Firefox 6 had shot up almost 100,000K to 220,544K:

Firefox 7 Beta 1 had only increased a little bit however to 130,952K.

Next I closed three of the same tabs and left the browsers running idly for another hout after which I checked memory usage again. Firefox 6 had decreased quite a lot to 148,064 - but that's still more than Firefox 7 Beta with 6 tabs open.

Firefox 7 Beta had actually increased memory usage for some reason - but only by around 7,000K to 137,440K.

Mozilla claim that Firefox 7 has much improved memory management due to something called Memshrink which can reduce memory usage by up anything up to 50% on previous versions of Firefox. While I wouldn't say it has improved memory usage by this much, it does seem to have significantly cut down the memory leak.

Other improvements in Firefox 7 include enhancements to Firefox Sync, increased performance for HTML5 Canvas animation and better CSS3 support. The interface is pretty much the same as Firefox 6, with a minimalist toolbar, and they've kept the "Feedback" button in the top right corner where you can easily submit thoughts on what you like and don't like about Firefox 7. Like most Firefox betas however, the major downside is that many plug-ins and add-ons won't work with it yet.

Download Firefox 6 and Firefox 7 Beta to judge for yourselves whether Mozilla have managed to finally tackle Firefox's memory leak.

Comments

  • aardmaat aardmaat

    the memory leak that is being fixed is about releasing memory after closing tabs and about the memory usage not growing if you keep the browser running for a long time. It has nothing to do with opening 2 tabs. If you´re talking about opening 2 tabs you´ll probably find that firefox uses way less memory than most other browsers http://www.sacbee.com/2011/08/22/3853307/which-is-the-more-memory-friendly.html

    • Sent on 26 Aug 2011
  • Joseph Joseph

    I don't want to be picky, but your test methodology is pathetic. Running the browser with two tabs over an unspecified amount of time and claiming this is a test? Is this a joke?

    What about comparing after an entire day of use...

    • Sent on 26 Aug 2011
  • Nick Mead Nick Mead

    @aardmaat, Thanks for the clarification. @Joseph, Admittedly it wasn't the most scientific test ever so I'm going to run them both over a longer period taking into account aardmaat's comments.

    • Sent on 26 Aug 2011
  • Glenn Glenn

    You mean the problem of clueless users calling something a "memory leak" that isn't but they've heard this catchy term before and use it because it sounds "cute"? Memory utilization is just memory utilization; it's not a memory "leak" because it keeps growing over time.

    • Sent on 26 Aug 2011
  • Nick Mead Nick Mead

    @Glenn, There is a memory leak problem with Firefox. The memory usage often shoots-up significantly suddenly (sometimes by up to 100,000K or more) even when just left idle for a while.

    • Sent on 26 Aug 2011
  • Andy Knowlson Andy Knowlson

    can somebody please tell me how or why this is so important about this memory leak. I have used firefox for a number of years and have not really encountered this memory leak !!!

    • Sent on 26 Aug 2011
  • Gauthier Gauthier

    @Andy, Firefox 6 usually crash when reaching 1700MB Usually the crash is due to his inability to allocate more memory. With the XUL and extension architecture, solving the memory issue is hopeless. Even if they could properly reclaim memory allocated for a tab, they can only delay the inevitable build up inside the UI interpreter.

    On clean installations crashing typically involve opening and closing 600 Tabs and visiting about 4000 pages. For me it occurs about every 4 days--I never close Firefox until it crash.

    On a Machine heavily loaded with development extensions it exhaust memory about every 2 hours. I'm still using it because with firebug and some other extensions it has the best set of development tools and JavaScript debugger, but it is at the borderline of usability.

    • Sent on 27 Aug 2011
  • Bob Bob

    This is a joke. You need to change the article's title to stop misinforming people.

    • Sent on 27 Aug 2011
  • opto opto

    Currently my FF 6.0 shows usage of 244 208k. I have 2 tabs open on non-media sites, had the session open for about 2 hours, have only 2 add-ons and have just cleared the recent history. A browser cannot use a quarter GIG of RAM from casual browsing and with the history cleared unless it has significant problems. Too bad cause I've been using FF for years but this memory problem keeps recurring and if FF7 doesn't fix it, it'll will go the way of Netscape and it'll be RIP FireFox, Hello Chrome.

    • Sent on 27 Aug 2011
  • jhunmanuel jhunmanuel

    i hope that in this site we can enjoy any application they have

    • Sent on 27 Aug 2011
  • Matt Freeman Matt Freeman

    Yikes I thought I was reading PC World magazine. Seems crap journalism isnt limited to the big publications. Well done on an entirely pointless article. It is scare mongering like this that keeps dev friendly browsers such as FF, Chrome, etc... out of the enterprise.

    • Sent on 29 Aug 2011
  • willy willy

    Here's my anecdote - I run an app that would freeze and become punchy almost any time I used FF. Realizing that correlation does not equal causation I tried to determine what was actually going on. After a frustrating hour I decided to install Chrome and compare and contrast the app performance to FF.

    No more punchy/freezing app.

    I know that this proves nothing but it is my anecdote so LOOK AT IT!

    =) FWIW - I have used FF for years and want to continue to use it.

    • Sent on 29 Aug 2011
  • eric eric

    Firefox 4.x+ are unusable on the Mac because of memory leaks -- and yes, I know what a memory leak is. A memory leak is when you don't change anything about the tabs you have open except maybe to reload them, and over a period of hours (about 6 for Firefox 6 on the Mac) it sucks up so much RAM that your 8GB computer takes 30+ seconds to switch between open tabs. Not to be confused with poor garbage collection, which is when you don't get the RAM back after closing tabs/windows/etc. Which is also historically a problem for Firefox (going back to the Phoenix days).

    It's quite sad that they can't seem to address this pretty simple problem that's been present for years.

    • Sent on 29 Aug 2011
  • Nick Mead Nick Mead

    I've considerbly revised this post after conducting a slightly longer experiment in order to isolate the memory leak. The results seem to show that Firefox 7 is considerably more stable than Firefox 6. @Andy Knowlson, All I can say is lucky you. However, if you've ever experienced a crash in Firefox or your computer freezing-up, it could well be because of Firefox's memory leak. @Matt Freeman, No Scaremongering intended and I hope the revised test I've done is proof of that. There is a memory leak in Firefox but Firefox 7 looks encouraging. @Willy/Eric, I agree and relate to your experiences and hope you are encouraged by the findings of the test above. I've only tested it on Windows but I'll try to do a test on Mac too.

    • Sent on 29 Aug 2011
  • dissatisfied-firefoxer dissatisfied-<br />firefoxer

    no offense.. I'm a sw developer so at times i NEED to keep several tab opened (say a tutorial, or checking mail on several webmail, say checking a site, a blog, anything)... I close firefox only @crash or when i leave the office... 88 open tabs 1.345.236 memory usage (growing) and another 220.022 (stable) memory usage for plugin-container. And the only plugin i use is firebug.... No offense but it's just poor :)

    • Sent on 31 Aug 2011
  • Rad Rich Rad Rich

    This is exactly why I quit using Firefox years ago. I got tired of the memory issues with this (and I.E).

    • Sent on 06 Sep 2011
  • Rad Rich Rad Rich

    LOL. I work at the Sac Bee. :)

    • Sent on 06 Sep 2011
  • William Dix William Dix

    Sorry Nick but my user experience on firefox 7 is that it is as bad as any of the previous versions when it develops a memory leak. I've had in the last week on the latest beta had memory usage balloon up to 1.2 gigabytes this with only 2 windows and 57 tabs open on my laptop. Time to crash is around 12-16 hours.

    • Sent on 11 Sep 2011
  • Nick Mead Nick Mead

    @William, I didn't test it for 12-16 hours but maybe based on your experiences Firefox 7 is just better at delaying the leak than previous versions.

    • Sent on 12 Sep 2011
  • Kirk M Kirk M

    In your tests I see you didn't include the memory used by "plugin-container" (Firefox' separate process for plugins). If you had you would have added another 100 to 125 MBs to your test data.

    In my daily use of Firefox 6 I haven't found any evidence of a memory leak directly related to Firefox at all and that's using the 64 bit version of Firefox in Linux Mint Debian Edition (LMDE) and the 32-bit versions for Windows. For those who are experiencing constant crashes and high memory use it's pretty much guaranteed to be add-on (extensions) related. Either that or you have a corrupt Firefox profile. And just because the user uninstalls a number of extensions over a period of time doesn't mean these extensions are entirely gone. They leave all sorts of settings behind in "about:config" and in the Firefox databases. They even leave extension related databases behind. All this can affect memory usage and browser stability.

    • Sent on 18 Sep 2011
  • Nick Mead Nick Mead

    @Kirk M, The only plugins I had installed were the most basic ones such as Flash. It's possible that Firefox doesn't leak memory as much in Linux as in Windows. You make a good point about extensions leaving data behind even after they are installed which may affect memory usage and stability.

    • Sent on 19 Sep 2011
  • Nick Mead Nick Mead

    Update: Note that Firefox 7 Beta 6 has just been released for Mac and Windows and top of the fixes is "Drastically improved memory use". Have they been reading this? Probably not but will be interesting to see if it's true!

    • Sent on 19 Sep 2011
  • bill harris bill harris

    Firefox may have worked on the memory leak issues, but like the article says, it still uses lots of memory.

    Its time for developers to streamline this browser. Otherwise something sleek and easy on memory (and probably commercial) will run them out of Dodge.

    • Sent on 28 Sep 2011
  • John Malone John Malone

    After 3 years, finally solved my continual Firefox memory leak problem. The solution (and I NEVER thought I'd be sayin' this...), is Internet Explorer 9.

    • Sent on 07 Jan 2012
  • Comment

Softonic on Facebook