The Trouble with Firefox

I tend to have a number of web browsers installed on my systems to make sure I can test web pages in a number of up to date browsers, and this includes Firefox (
)

But one issue I have with Firefox is how after a few hours’ use – especially as my use these days tends to include a number of AJAX-based sites, Gmail, etc. – the amount of memory being consumed sky-rockets despite, or possibly because of, the amount of physical memory on my main work machine.

This evening, I’ve implemented a number of hacks that may or may not help things out with this supposed memory leak (apparently it’s working as designed…), so here we are. This is Firefox version 2.0.0.6, by the way.

Firstly, we want to reduce the amount of RAM being used for Firefox’s cache. We do this like this:

1. Type “about:config” (no quotes) in the browser
2. Find browser.sessionhistory.max_total_viewer
3. Set its value to “0″
4. Restart Firefox

Secondly, as minimising the browser window seems to accomplish little, we’ll try to reduce memory use when it is:

1. Type about:config again 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.

Still with me? Now we’ll move on to page rendering speeds and more memory leak hacks, this time from “Have Laptop Will Travel”:

“Type in the address bar about:config.
Type pipelining in the filter bar.
Double-click on network.http.pipelining to set its value to TRUE.
Double-click on network.http.pipelining.maxrequests and change its value to 12 or more if you have broadband.

Play a little with the setting to find a configuration which is best for your connection.

Firefox is most hated for its memory usage. After having browsed some hours, Firefox will easily have taken 250MB or more of memory and slow down your PC. This is because FF has never been programmed to overwrite the memory it doesn’t use anymore and give free to other programs. Sometimes even closing Firefox won’t speed up your PC anymore. But the leakage can be prevented.

To do so, open a new tab and type about:config in your address bar again.
This time we want to limit the size of the memory cache.
Therefore we need to create a new preference, named browser.cache.memory.capacity.
Right click on any free area in the preferences window and choose New —> String.
Type now the name browser.cache.memory.capacity and in the next window set the value to 20000.
This will limit the size of the cache in the RAM to 20000KB and should prevent the annoying memory leak.
Restart your browser now.”

And after I’d found and implemented these hacks, I discovered them and more at the element14 Blog.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.