Quick Firefox tweak - free mem
Posted on December 23, 2005
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.
- Start Firefox (yeah, I know… duh.)
- type “about:config” in the address bar and hit enter (don’t type the double-quotes)
- 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.
- If you DO have the preference, make sure it is set to true
- If you do NOT have the preference, add it
- Right click anywhere in the preference list and select New -> Boolean
- Preference name should be “config.trim_on_minimize”
- Select true for the value
- 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: about:config, firefox, memory, tweak
Possibly Related Posts
Comments
42 Responses to “Quick Firefox tweak - free mem”
Leave a Reply



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.
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…
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.
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?
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?
Nothing leaps to mind, Ed. Make sure you’re typing the preference name correctly though.
Wow, thanks for the tip.
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?
@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.
Thanks, this is awesome.
Seems doesn’t work in Windows Vista…
Well, I can’t help ya there. I’ve yet to actually install Vista.
This doesn’t seem to work on linux.
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.
@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!
This is an awesome hack… the memory leak with gmail was doing my head on…
all hail you!
Godly you are… 124,xxx to 31,xxx
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
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.
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.
Does anything work correctly on Vista? The Mozilla KB addresses trim_on_minimize:
http://support.mozilla.com/kb/High+memory+usage
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.
Helpful tip, was really having problems with firefox being a mem hog but preferred using it over other browsers. This solves my problem. Thanks.
You realy helped me out with this one. Thanks for the tip.
Thanks for the tip. This did the trick (at least for minimizing the amount of memory that’s used).
I accidently chose the wrong option instead of boolean how do i delete it or modify it?
Thanks for the great tips
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.