Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

Skip to comments.

Fixing Firefox's memory leak (January, 2005)

Posted on 01/24/2005 3:04:40 PM PST by Terpfen

I noticed a few Firefox threads here have people complaining about how much memory Firefox takes up. This is a known memory leak, and the Mozilla guys haven't gotten around to fixing it for whatever reason. But there's no reason your Firefox should take up 70,000K in memory, so here's how to fix that memory leak and keep Firefox from bloating up.

1. Open a new tab. Type "about:config" without quotes into the address bar and hit enter/click Go.

2. Right-click anywhere, select New, then Integer. In the dialog prompt that appears, type:

browser.cache.memory.capacity

3. Click OK. Another dialog prompt will appear. This is where you decide how much memory to allocate to Firefox. This depends on how much RAM your computer has, but generally you don't want to allocate too little (under 8MB), but if you allocate too much, you might as well not do this. A good recommended setting is 16MB. If you want 16MB, enter this value into the dialog prompt:

16384

(Why 16384 instead of 16000? Because computers use base-12 counting. Thus 16 megabytes = 16384 bytes. Likewise, if you want to double that and allocate 32MB, you'd enter 32768.)

4. Click OK to close the dialog box, then close all instances of Firefox and restart. If your Firefox still uses the same amount of memory, give it a few minutes and it should slowly clear up. If that fails, try a system reboot.

Hope I did a service to some FReepers today.


TOPICS: Computers/Internet; Miscellaneous
KEYWORDS: browser; firefox; mozilla
Navigation: use the links below to view more comments.
first previous 1-2021-4041-56 next last
To: Terpfen

I'm gonna give a shot. The virtual memory size has been hanging out at about 120MB. I set my memory limit to 24576, and will check see if the paged memory goes up.


21 posted on 01/24/2005 7:22:04 PM PST by Doohickey ("This is a hard and dirty war, but when it's over, nothing will ever be too difficult again.”)
[ Post Reply | Private Reply | To 19 | View Replies]

To: Keith in Iowa
Everything in computers is base 2 - binary. It's all based on bits & bytes & powers of 2... 8 bits to a byte...

I thought it was base 10 binary. (Of course, any base is base 10)

22 posted on 01/24/2005 11:32:49 PM PST by supercat (To call the Constitution a 'living document' is to call a moth-infested overcoat a 'living garment'.)
[ Post Reply | Private Reply | To 8 | View Replies]

To: Drango

Why do geeks confuse Christmas and Halloween?


23 posted on 01/24/2005 11:33:48 PM PST by supercat (To call the Constitution a 'living document' is to call a moth-infested overcoat a 'living garment'.)
[ Post Reply | Private Reply | To 14 | View Replies]

To: supercat

A: Because 31 OCT = 25 DEC


24 posted on 01/24/2005 11:35:58 PM PST by Drango (To Serve Man.....IT'S A COOKBOOK!)
[ Post Reply | Private Reply | To 23 | View Replies]

To: Terpfen

There is only browser.cache.memory.enable in my Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

I.e. no browser.cache.memory.capacity. Could someone advice?


25 posted on 02/22/2005 2:38:53 AM PST by avalez
[ Post Reply | Private Reply | To 1 | View Replies]

To: avalez

You have to create the value yourself. Read the step again--it's an instruction as to how to create that value.


26 posted on 02/22/2005 5:55:07 AM PST by Terpfen (New Democrat Party motto: les enfant terribles)
[ Post Reply | Private Reply | To 25 | View Replies]

To: Terpfen

Oops, sorry


27 posted on 02/22/2005 9:54:44 AM PST by avalez
[ Post Reply | Private Reply | To 26 | View Replies]

To: Terpfen
I'm disappointed, did I do/understand something wrong? I did everything as you said, set the cache to 32768. But, FF still leaks! Currently it's hogging >57 megs. And, it keeps getting larger as the night goes on.

Fortunately I have that session saver extension installed, so I frequently close and re-open Firefox. But that can be quite annoying, since I'm doing extensive research at the moment.

Any idea what could've gone wrong?
28 posted on 04/08/2005 5:08:32 PM PDT by addicted2h (ASUS L2D, AMD Athlon XP, W2K, 458,204 KB RAM)
[ Post Reply | Private Reply | To 1 | View Replies]

To: addicted2h

Not sure. Some people have the same problem. Maybe it's more of a "memory recommendation" than an actual limiter, which would make sense, especially if you have a lot of windows/tabs open constantly.

Word is Mozilla might have a fix ready for Firefox 1.1's release in June, but that's not set in stone.


29 posted on 04/08/2005 5:13:35 PM PDT by Terpfen (New Democrat Party motto: les enfant terribles)
[ Post Reply | Private Reply | To 28 | View Replies]

To: Terpfen

I created the new entry, did a reboot and FF is still using over 27 Meg...same as before the reboot. I think I'll play with some smaller integers and see what happens.


30 posted on 04/08/2005 5:36:52 PM PDT by Bloody Sam Roberts (Remember that great love and great achievements involve great risk)
[ Post Reply | Private Reply | To 1 | View Replies]

Comment #31 Removed by Moderator

To: verysick

Yes, the memory leak is still there. At the time of my posting this, these steps DID help to minimize and partially eliminate the memory leak. Changes to 1.5 make them less effective.

The best solution right now is to use config.trim_on_minimize.


32 posted on 12/22/2005 9:37:27 PM PST by Terpfen (Libby should hire Phoenix Wright.)
[ Post Reply | Private Reply | To 31 | View Replies]

To: Terpfen
The best solution right now is to use config.trim_on_minimize.

Another useful tweak is to change the browser.sessionhistory.max total viewers value from -1 to 0. It disables caching of previous pages, which slows down backspacing slightly with broadband but I've noticed quite a bit less memory being used.

33 posted on 02/18/2006 8:44:15 AM PST by Reaganwuzthebest
[ Post Reply | Private Reply | To 32 | View Replies]

Comment #34 Removed by Moderator

To: verysick
They definitely need to do some work on memory. In XP memory use averages between 38 and 40 mbs for me unless I use a WMP or Real Player plugin, then it shoots up to around 60+ and stays there since it doesn't give it back, even when you're done on the web page. To solve that little problem I installed the MediaPlayerConnectivity extension, which launches embedded audio and video in the external player.

Also I keep config.trim_on_minimize set to false but I do have browser.cache.memory.enable on false as well. That seems to have helped somewhat.

35 posted on 03/16/2006 2:32:23 PM PST by Reaganwuzthebest
[ Post Reply | Private Reply | To 34 | View Replies]

Comment #36 Removed by Moderator

To: verysick

It could be related to the extensions. Have you tried running it in safe mode for a while to see what kind of memory use you get?


37 posted on 03/27/2006 12:57:41 PM PST by Reaganwuzthebest
[ Post Reply | Private Reply | To 36 | View Replies]

To: Terpfen

I read someone's answer and tried it, the thing with the memory setting and the binary discussion. Well, it's true, it didn't work.

So, I decided, "Instead of being a lazy ass and looking for answers elsewhere, I'll simply go into the about:config and looked for myself."

Guess what? I got it right on the first shot out...

Here you go, THIS is what you need to change, VERY SIMPLE!

Find this line using the about:config in the URL = browser.cache.memory.enable

Click or double click on it so it reads: FALSE It should turn Bold also, to note the change.

I tried it, loaded up on as many pages as I could find and WHAMMO! Memory never exceeded my limits and dropped down to the 22k evertime a page would finally complete loading!!!

I now have about 10-20 forums to post this too because other people are still screaming about it.

Enjoy!


38 posted on 04/18/2006 5:07:40 PM PDT by Oahn Macleod (Thank me later)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Oahn Macleod

Is this issue still unsolved.. i am seeing mozilla still leaks!!


39 posted on 07/07/2006 12:32:43 AM PDT by FreeIndian
[ Post Reply | Private Reply | To 38 | View Replies]

To: Oahn Macleod

This caused some odd behaviour when I tried it on my 1.5.0.4 install. The home botton and various links in my bookmarks toolbar ceased to work, although there did seem to be an improvement. Don't know if anybody else had the same issue.


40 posted on 07/11/2006 1:34:22 AM PDT by pauliehaha
[ Post Reply | Private Reply | To 38 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-4041-56 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson