04 November, 2007

How to Really reduce the memory usage in Firefox

After the release of Firefox 2.0, the memory leak has become an even more notorious problem than before. On average, Firefox should take up no more than 80MB of RAM. Any more than that and you can consider yourself a victim of Firefox’s memory leak. I’m sure you’ve probably already seen a ton of guides on how to fix the memory leak problem in Firefox already. The reason why I’m writing another one on Vista Rewired is because none of those have worked very well for me. This one will be a little different because I’ve added a few of my ingredients in.

Just to give you a heads-up, this guide is going to be quite long but it’ll cover everything you need to know.

Before we do anything, make sure you have the newest version of Firefox. If you don’t have the latest version, you can


1) Check your extensions and themes:
The most common cause for high memory usage for Firefox usually lies in the extensions and themes. If you overloaded your Firefox with extensions, you can expect high memory usage. Uninstall the ones you don’t need, and update all the ones you will be using. After that, you’ll first want to consult this list of problematic extensions that could be causing the problem. Make sure none of the extensions you are running are on that list.

After comparing with that list, if you still have the problem, it could be the result of a newly installed theme or extension. Experiment with shutting down suspicious extensions or switching themes.

2) Start Firefox in Safe Mode

If one of your extensions is not in that list, boot Firefox into Safe Mode to disable all extensions and themes. You can do this by going to Start > Run, and entering:

firefox -safe-mode

A box similar to the one below should appear.

Check Disable all add-ons, then select Continue in Safe Mode. Now, compare the RAM usage of when Firefox had it’s add-ons enabled and when they were disabled.
You can expect a difference of a couple megabytes since the extensions have been disabled. But if you notice a large difference in RAM usage, this may suggest a problem within your extensions or theme.

3) Plugins:

Plugins could also be the cause of the problem. Here are some links from MozillaZine that you can refer to:

- Reducing Adobe Reader memory usage
- Shockwave memory usage
- Flash memory usage
- Java memory usage

4) Clear your Download History:

Allowing your download history to accumulate can have a huge impact on Firefox memory usage. Personally, I prefer just clicking Clean Up when I’m done with my downloads since the download history box can be very convenient when you forget where you have saved your files.
Alternatively, you can set Firefox to not keep a history of your downloads by navigating to

Tools > Options > Privacy > Uncheck Remember what I’ve downloaded

This will erase your download history each time you close the Downloads History window.

5) Additional Settings:

There are a couple of settings you can tweak in Firefox that can limit the amount of memory allocated for caching.

1. Open Firefox and type in about:config in the address bar.

2. Type browser.cache.memory.enable in the Filter Bar and make sure it is enabled. If not, just double click it to set it to enable.

3. Right-click an area of empty space in the browser and choose New > Integer. Type in browser.cache.memory.capacity and click OK.
The integer value you enter depends on the amount of RAM you have.
If you have:

256 MB of RAM, enter “4096”
512 MB of RAM, enter “8192”
1 GB of RAM, enter “16384”
and so forth… Just double the number as your RAM doubles.

4. Right-click anywhere on the window and click New > Bootlean and enter:

config.trim_on_minimize

And set it to true. When you minimize an application in Windows Vista, the memory usage is supposed to go down but Firefox doesn’t do this. By setting this to true, Firefox will begin to use less memory when minimized.

5. Restart Firefox for these changes to apply.

6) Close Firefox periodically:

I know what you’re thinking, but there is an extension that can save your internet sessions so when you re-open Firefox, you can have it exactly the way it was before you closed it - the tabs, the cache, everything. You can download Extension Manager here.
Once you have downloaded the extension, we need to set it up. First, we need to get to the options window: Tools > Session Manager > Session Manager Options

Once you’re in the options window, just make sure your screen looks like the one below and you’ll be fine.

7) Get Portable Firefox:

I am actually not sure how accurate this may be, but using Portable Firefox has definitely helped minimize my memory usage. To be honest, I don’t know why or how, but it just works! You can download Portable Firefox here. For the most part, it runs the same way your regular Firefox does.

source: vistarewired.com