Submit your breaking news stories and original articles to us by contacting us
Back when Firefox was a 1.0 “baby” application, many tech. enthusiasts started adopting it and proclaimed it as the future of web browsing. However, ever since it reached a certain version (namely, version 1.5) there has been a continuous rumor of it having memory leak problems.
Thousands of users and bloggers reported that after a certain amount of time Firefox starts to consume too much memory, therefore paving the way for the rumor-mill. Even I have caught Firefox consuming an amount of memory close to the 100 megabytes, however I never considered it a problem because think that I instinctively assumed that it had something to do with the browser’s cache, and that’s exactly what the “problem” is.
An unknown blogger from the element14 wordpress blog explains:
This âfeatureâ is how the pages are cached in a tabbed environment. To improve performance when navigating (studies show that 39% of all page navigations are renavigations to pages visited less than 10 pages ago, usually using the back button), Firefox 1.5 implements a Back-Forward cache that retains the rendered document for the last five session history entries for each tab. This is a lot of data. If you have a lot of tabs, Firefoxâs memory usage can climb dramatically. Itâs a trade-off. What you get out of it is faster performance as you navigate the web.
Ok. So now that we know that it’s a feature, how can we change Firefox’s settings so it won’t eat up so much memory? Easy:
1. type âabout:configâ (no quotes) in the browser.
2. Find browser.sessionhistory.max_total_viewer
2. set itâs value to â0â³
There’s also a little hack you can do so that Firefox only consumes 10mb of memory when it’s minimized:
1. Open Firefox and go to the Address Bar. Type in about:config and then press Enter.
2. Right Click in the page and select New -> Boolean.
3. In the box that pops up enter config.trim_on_minimize. Press Enter.
4. Now select True and then press Enter.
5. Restart Firefox.
So there you have it, the Myth Busters *cough* I mean, element14 helps to debunk this myth about the alleged Firefox Memory Bug. And there’s also another tweak there to help you increase Firefox’s speed in loading pages (although, it isn’t very noticeable with DSL connections), which is very similar to the same tweak we gave you last year.
Happy browsing!
Category: Uncategorized
16 Responses for "Debunking Another Myth: Firefox’s Memory Leak Bug"
October 13th, 2006 at 4:23 pm
1So, if I find a cure for cancer, I will debunk the myth of cancer then?
This is just a tweak to fix an unwanted high use of memory, nothing more, nothing less. It’s far from a debunk of a myth.
October 13th, 2006 at 4:53 pm
2The myth in question is that people consider it a bug, and not a reflex of one of it’s features.
When people can’t “see” something, they often credit it as a “myth” or “mischief”.
I’ll give you a perfect example of what I mean. With Firefox, people obviously don’t understand where that extra memory consumption comes from because it looks and feels exactly the same as it’s 1.50 version (for the most part).
However, with iTunes 7, everyone understands why it consumes more memory because it has those “eye-candy” features, therefore they don’t question the extra horse-power it needs nor brand it as a bug, unlike what happens with Firefox.
October 13th, 2006 at 9:39 pm
3Griffith, I’m using Firefox 1.5.0.7 for OS X. The value of browser.sessionhistory.max_total_viewer is originally -1.
I’m trying out both settings right now.
October 14th, 2006 at 9:49 am
4Firefox should release the cached pages from memory when the associated tab is closed, but it doesn’t!!! There have been times when Firefox consumed up to 200 MB of member even after all the tabs were closed.
October 14th, 2006 at 10:52 am
5They call it a feature, but it is not one that helps half as much as it hurts. Also, Opera has the same “feature”, and it never, ever has been anywhere close to the amount of ram firefox uses after about an hour or so. At the start, they’re even, at the end though firefox ends up using a lot more ram due to this amazing little “feature” that Opera uses without such problems.
The nails left in your flowerbed after the roofer gave you a new roof are just one of the better features that said roofer offers over competitors.
October 14th, 2006 at 11:57 am
6Of course the other big “Firefox leak” is actually Flash leaking memory. Nothing can be done about that, except by only using Flash-free sites.
October 14th, 2006 at 12:15 pm
7Understanding one of the reasons that Firefox consumes a lot of memory doesn’t mean there aren’t more. In fact, Firefox is a memory-leaking beast of an application, and the Mozilla team is actively trying to plug each leak. It’s just a hard problem.
October 14th, 2006 at 12:24 pm
8Firefox consumes vast amounts of memory even after all tabs have been closed. This is a bug. Your explanation does not match the experimental data, so your theory that it is ‘just a configuration choice’ is incorrect.
And not just memory… also CPU. After being turned on for over a week, Firefox was really bogging down my computer. I closed all but one window and one tab, and it was still using over half of my CPU (a 2.8Ghz celery). I closed Firefox, and my CPU usage plummeted to nothing. This is not a feature, or a poorly configured option… this is a bug.
October 14th, 2006 at 12:38 pm
9The problem is that there was probably no user study done to determine if this was actually wanted or liked behavior. Sure they tested that X% of pages are revisted but did they look at how the RAM issues associated it affected users? So while it may be a feature, it’s side effects are certainly a Interaction bug.
At work I regularly have to restart Firefox for this exact issue, and I’ve tried setting the cache values and even then it doesn’t seem to help much.
October 14th, 2006 at 3:55 pm
10Most memory leaks in Firefox are caused by developers of extensions and developers that use JavaScript in web pages.
The main cause of this is not cleaning up event handlers on unload.
Also from time to time there are memory leaks and regression bugs in Firefox itself, mainly with alphas and betas.
Leak Monitor is an extension that tells you what caused a memory leak and where in the code. https://addons.mozilla.org/firefox/2490/
How do I know this? I am a Firefox extension developer.
October 14th, 2006 at 5:19 pm
11I think setting browser.sessionhistory.max_total_viewer to -1 is preferred since it will calculate an appropriate setting based on your memory. I suspect that a setting of zero will reduce your back button performance.
October 14th, 2006 at 5:33 pm
12“Most memory leaks in Firefox are caused by developers of extensions and developers that use JavaScript in web pages.
The main cause of this is not cleaning up event handlers on unload.”
FF extensions should be responsible for cleaning themselves up yes, but if I close a webpage, and it doesn’t close it’s even handlers, then FF should do it. Anything else is akin to your OS running out of RAM when programs quit without freeing memory. This is a bug.
October 15th, 2006 at 12:50 pm
13One man’s bug is another man’s feature
October 24th, 2006 at 6:11 pm
14Re #8 Myrddin Emrys: I can completely second your observations!!
Re #10 Yaa101: Even if that is really the cause, it does not help. I have to use some extensions to get a decent browsing experience and I have to view web pages that other people create (with java or flash or whatever).
At least there should be a “Garbage collect” button in Firefox that restarts the flash plugin, the java engine, and cleans up all “cached” pages and any other stuff without forcing a restart (and, yes, I know about the possibility to restart with a saved session in ff2 or with an extension for ff1.5).
Maybe someone wants to write a (leaking) extension for that? ;-)
November 10th, 2006 at 2:56 pm
15# 14: Add ChromEdit Plus for a restart button with the option to clear all cache when closing and to ask set in Tools>Options>Privacy>Priavte data BUT have your Tab Mix Plus on to allow saving of the last 1 session.
Use the Memory Leak extension and run your browser in SafeMode, extensionless visiting the same sites that usually cause the high RAM/VM, CPU usage or crash. Majority of the leaks are with the extensions as Yaa101 pointed out correctly.
December 6th, 2006 at 2:48 am
16Do you people forget that Firefox is a virtual application and that it runs in its own Virtual Machine called XUL Runner!
Compare for example Azureus and BitComet! Azureus is a Java application, which runs in a virtual machine called JRE so the usage of lots of memory is justified. It practically uses a second “OS” in which runs Azureus! BitComet on the other hand is a native Win32 application, it doesn’t need the second “OS” thus it uses less memory.
The same thing goes for .NET and pure Win32 apps! If I had more experience I could point out other comparisons…
And yes, Firefox as a VM application should have a garbage collector as most of other VMs do!
And extension programmers should be taught how to use such features!
It’s kinda’ sad to see all these people whine about something they don’t understand!
Why do people whine when they get it for free? Should Mozilla charge us for using their browser so that people can justify their whining?
If you wanna help… start debugging!
RSS feed for comments on this post
Leave a reply