Tuesday, April 22, 2008

Light A Flame Under Firefox's Memory Usage

Firefox Too Fat

Hunting around a bit I found an excellent little post that explains how to stop this memory vacuum from getting away from you.


  1. Simply type about:config in your browser’s address bar.
  2. On the resulting screen, right-click and select New -> Boolean.
  3. In the input box that appears, type config.trim_on_minimize. Press enter.
  4. Select True, and hit enter.

What this does is causes Firefox to dump to your hard drive when you
minimize it. Upon re-maximization, it loads back into RAM, but at a
fraction of the bloated size it was. As an example, I just checked
Firefox’s memory usage. With three tabs open, I was sitting around 80
MB of RAM being used. On minimization, this immediately dropped to
under 10 MB. The upon maximization, it went up to 40 MB or so.


As I often have a lot of application open at once, the ability to
control their memory usage like this is fantastic. If you use
Thunderbird as your mail program, you can make the exact same
modification. To get into the About Config, simply navigate to Tools / Options / Advanced / Config Editor.


Firefox is too slow


If you’re on high speed Internet, you’re also going to want to
consider this little speed-up trick. By default Firefox is set to only
download pages to your browser with four simultaneous connections. This
is alright if you’re on dial-up, but broadband can handle a lot more
than that.


  1. Again type about:config in your browser’s address bar.
  2. On the config page, look for these three entries: network.http.pipelining, network.http.proxy.pipelining, and network.http.pipelining.maxrequests.
  3. Change network.http.pipelining and network.http.proxy.pipelining to True.
  4. Change network.http.pipelining.maxrequests to a higher number based on your net speed - somewhere between 10 and 30 ought to do it.
  5. As a final step, right-click the screen and select New-> Integer. Name it nglayout.initialpaint.delay and set its value to “0″. This sets the amount of time the browser sits on its ass before acting.

See the original article at Forever Geek. And if you are using IE, bang your head against your desk five times and then check out this video for a solution just for you.


And finally, if that’s not enough - check out this nifty tool for tuning up Firefox. Appropriately named FireTune, the free application from Totalidea Software tunes up Firefox to work faster (very likely by implementing some of the above).


Clocking the results


So to test if any of these tweaks did anything but make me feel like it should be going faster - I put it through the Stopwatch - a neat little Web app that clocks a site’s load time. The results?


9.0s - With original (non-modified) setup.

8.2s - After FireTune automatic tweak.

9.3s - After the Forever Geek mod (faster, huh?).

7.0s - Combination of the FireTune and Forever Geek mod.


Now, it should be noted, that as I’m located in China, my load times
are going to be a bit slower due to sheer distance in accessing most
(US-based) sites. Whatever the case, a 1 to 2 second improvement isn’t
much to e-mail home about.


Let me know if you have any tricks or tips that you find improve your Firefox or browser experience.


Source: http://www.daobydesign.com/blog/2007/09/light-a-flame-under-firefoxs-memory-usage/