Quick Firefox tweak - free mem

calendar Posted on December 23, 2005   comments 42 Comments

I’ve groused in the past about how much memory browsers seem to want to hoard these days. I’m a bit of a fanatic about memory usage, to be honest. I really like how Opera will release memory when it is minimized. When you restore it, it just grabs what it needs. Seems to help calm the “rampaging overuse of memory syndrom” that most modern software seems to suffer from.Now there’s an option you can set in Firefox to do the same thing.

  1. Start Firefox (yeah, I know… duh.)
  2. type “about:config” in the address bar and hit enter (don’t type the double-quotes)
  3. type “config.trim_on_minimize” (again, not the double-quotes) into the Filter field. Odds are, you won’t have this preference but we should check first.
    1. If you DO have the preference, make sure it is set to true
    2. If you do NOT have the preference, add it
      1. Right click anywhere in the preference list and select New -> Boolean
      2. Preference name should be “config.trim_on_minimize”
      3. Select true for the value
  4. Close Firefox and then reopen it.

That should be all it takes. To verify you got it right, load up a few pages in a few tabs. Start up task manager or your platform’s monitoring tool of choice and see how much memory Firefox is using. Now, minimize Firefox. Check that memory usage again.Cool, huh?

tags Tags: , , ,

Related Posts Possibly Related Posts

Comments

42 Responses to “Quick Firefox tweak - free mem”

  1. Rich G. on December 23rd, 2005 2:42 pm

    lookit you with the snow flakes and the purdyness…

    thanks for the tip. I can’t say I’d ever noticed any system degradation from firefox with many tabs open, but I’ll take your word for it that there musta been.

    Now I’ll be even fasterish. :)

  2. » pingback » Days of Software Architect » Firefox memory tweak on February 15th, 2006 1:59 am

  3. Hoop Jumper on February 15th, 2006 7:53 pm

    Holy cats! GREAT add. Thank you. An sample of my results:

    37,xxx fullscreen. 6,xxx minimized. That says it. You’re a freakin magician.

    Why the heck wouldn’t this be bundled in the release? I didn’t notice any lag to “catch up” once I maximized…

  4. Rich G. on February 18th, 2006 1:39 pm

    rofl - wonder what happened that I was still on -1 unless… I musta done it while on the road and only done the laptop, which by the dates looks about right. lol.

  5. Yuri Kennisman on February 27th, 2006 2:06 am

    After I changed this setting, I frequently encounter the following message: “Firefox is not responding but still running. Please close all instances and start Firefox again.”. Any ideas on how to resolve that?

  6. » pingback » Opera Is Easily The Best Browser Avalible - CyberKnowledge Blog on August 25th, 2006 9:18 am

  7. » pingback » Firefox 2 Beta 2 - A bit longer look » Solo Technology on September 1st, 2006 7:39 pm

  8. Ed D on September 6th, 2006 12:18 pm

    I tried this but get an error message stating the following when I try to create a new Boolean:

    XML Parsing Error: not well-formed
    Location: chrome://global/content/commonDialog.xul
    Line Number 1, Column 1:

    ^

    Any thoughts?

  9. Chris on September 6th, 2006 4:10 pm

    Nothing leaps to mind, Ed. Make sure you’re typing the preference name correctly though.

  10. » pingback » Firefox, Thunderbird tip · Cristian’s blog on September 12th, 2006 6:32 am

  11. » pingback » Memory Problem with Firefox at Noggie on October 11th, 2006 2:04 am

  12. » pingback » robocub » Blog Arşivi » firefox’taki hafıza sorununa ince ayar on October 25th, 2006 3:21 pm

  13. » pingback » Freeing up memory in Firefox - config.trim_on_minimize « Morgret Designs on November 19th, 2006 8:22 pm

  14. » pingback » Morgret Designs » Blog Archive » Freeing up memory in Firefox - config.trim_on_minimize on December 13th, 2006 11:00 am

  15. » pingback » First Release: Meebo Desktop » Solo Technology on December 25th, 2006 9:27 pm

  16. Nobody Special on February 10th, 2007 2:53 am

    Wow, thanks for the tip.

  17. Mastarshake on February 10th, 2007 7:23 am

    This tip seems to work, but only for a few seconds at a time.

    I tested it by opening a bunch of firefox windows (to the tune of like 60,000K or more) and then minimizing the whole shebang, while leaving the Task Manager open.

    At first, the dropoff in memory usage was something over ninety percent. 70,000K reported usage would change to something like 8,000K.

    So I thought “Sweet. It works.” For about a half-second. After about that long, the reported memory usage doubled, then tripled, then quadrupled, then proceeded in a non-exponential but pretty quick fashion almost back to the same amount as was being used while the windows were all maximized on top of each other.

    I tried this several times, with the same result.

    The only thing I can think is that I possibly hadn’t allowed all the data to be fetched from the web before minimizing the windows, and they were still yelling for memory to keep downoading images and stuff, but I was loading the main page of Yahoo.com. Not the leanest of pages, but certainly not an excessive bandwidth blaster.

    What gives?

  18. Chris on February 10th, 2007 7:37 am

    @Mastarshake - however, if you had closed all those pages, Firefox would still have “held” the memory. Using this tweak, closing those pages and then minimizing releases the memory.

    Since the pages are still all open… well, they’ll still need some amount of memory.

  19. Ryan on February 21st, 2007 12:08 pm

    Thanks, this is awesome.

  20. » pingback » April 2007 in Review » Solo Technology on May 2nd, 2007 6:31 am

  21. » pingback » Netscape 9.0 beta 1 First Look » Solo Technology on June 8th, 2007 9:34 pm

  22. Doomer on June 12th, 2007 2:32 pm

    Seems doesn’t work in Windows Vista…

  23. Chris on June 12th, 2007 3:19 pm

    Well, I can’t help ya there. I’ve yet to actually install Vista. :-)

  24. Ryan on July 15th, 2007 4:33 am

    This doesn’t seem to work on linux.

  25. Alisha on August 30th, 2007 12:26 pm

    Thank you! Firefox normally uses around 130MB of memory for me, and this tweak gave me back more than half of that!

    Although, I noticed the usage still keeps going up with it minimized, but a lot less than it used to. That’s probably from me keeping Gmail and Google Reader open in the tabs.

  26. Chris on August 30th, 2007 12:38 pm

    @Alisha - glad you like it. And I think your supposition is correct.

    Where this really pays off is after you’ve closed a few tabs; a quick minimize/maximize really sheds memory!

  27. » pingback » Useful Tweak: Freeing up memory when using Firefox | The Foo Logs on October 9th, 2007 5:24 pm

  28. paul on October 10th, 2007 8:29 pm

    This is an awesome hack… the memory leak with gmail was doing my head on…

    all hail you!

  29. Karan on October 25th, 2007 10:49 am

    Godly you are… 124,xxx to 31,xxx

  30. » pingback » Reduce Firefox Memory on Vista » Solo Technology on November 14th, 2007 6:13 pm

  31. suicidalsam on November 28th, 2007 2:27 pm

    another awesome tweak. I always use firefox and had problem with it eating up too much memory and slowing up my PC when i opend up too many tabs.

    This tweak really reduced the mem used by firefox.

    Firefox is the best browser ever.:D

  32. -DC- on December 12th, 2007 2:47 pm

    The config.trim_on_minimize setting (Windows only) does not reduce the amount of memory used, it just swaps memory from RAM to disk. This may make Firefox slow to “wake up”. If config.trim_on_minimize is left set at the default value (false), the memory will be swapped to disk only if it is needed by another application. Therefore, for most purposes the default value is recommended.

  33. Chris Kasten on December 12th, 2007 8:47 pm

    Hey DC - is there some documentation you can nudge me towards for trim_on_minimize? When I posted this tip a couple years ago, I couldn’t find any, but I liked watching FF’s memory “usage” drop from 400+ to under 50 :-)

    And unfortunately, it turns out this isn’t just Windows only. It sure doesn’t do a darned thing under Vista at any rate. So it must be a “some windows versions” only. Peh.

  34. -DC- on December 13th, 2007 7:41 am

    Does anything work correctly on Vista? The Mozilla KB addresses trim_on_minimize:
    http://support.mozilla.com/kb/High+memory+usage

  35. Chris Kasten on December 13th, 2007 1:55 pm

    Hah! Well, some things seem to work in Vista… but it’s definitely a bit different, that’s for sure!

    Thanks for the link, appreciate it.

  36. Mike on February 2nd, 2008 8:57 am

    Helpful tip, was really having problems with firefox being a mem hog but preferred using it over other browsers. This solves my problem. Thanks.

  37. hypotheek on February 6th, 2008 9:51 am

    You realy helped me out with this one. Thanks for the tip.

  38. Cathy on March 8th, 2008 10:50 pm

    Thanks for the tip. This did the trick (at least for minimizing the amount of memory that’s used).

  39. Tezz on March 22nd, 2008 5:00 pm

    I accidently chose the wrong option instead of boolean how do i delete it or modify it?

  40. hypotheek on April 17th, 2008 7:10 pm

    Thanks for the great tips

  41. Daniel on April 25th, 2008 9:34 pm

    That’s a neat trick, but doesn’t seem like a good final solution since we use browsers so much so we’re constantly maximizing them again.

    I’ve found that Firefox under Vista is pretty stable, up to about 130 tabs or so, on my system.

  42. » pingback » BADMOTORFINGER.com » Blog Archive » Use Gmail? Make It Cooler! on May 13th, 2008 10:03 am

Leave a Reply




Have you read the Comments section on the Disclaimer page?

About

Wandering the Internet, looking at all things bright and shiny. Playing with many, writing about some. More …

Recent Posts

Recent Comments: