This May Help Your Firefox Memory Leak

Now, this is by no means a REAL fix for the Firefox memory leak, but it certainly does appear to help it quite a bit. This little fix will move Firefox to your hard drive when you minimize it, and as a result it will take up less than 10MB of memory while minimized. So far, from my experiences with using this today, when you maximize Firefox it will obviously increase the memory usage. However, it does not seem to go back up to the insane amount that it was at before minimizing it. For example, Firefox was at 180MB of memory usage and then I minimized it and after a few seconds I maximized it. After maximizing it and continuing on my routine business it appeared to only have gone up to 60MB. This seems to be a good solution for me right now since I frequently maximize and minimize Firefox anyways.

Now I know many people will say that Firefox will take longer to maximize since it will be located on the hard drive, but I haven’t noticed ANY delays. It is able to redraw itself just as quickly as if it was located in the ram (in my experience). Okay, now here are the few simple steps:

  1. Open Firefox and go to the Address Bar. Type in about:config 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.

See how quick and painless that was? At any rate you can always go back and delete the same setting that you just created if you start to experience any issues. I have also set the browser.sessionhistory.max_total_viewers value to 0 because that will prevent Firefox from caching pages for the back button. This is also supposed to free up some memory that gets stolen.

Update:
Martin has informed me that this fix also works for Thunderbird. I am not a Thunderbird user so I didn’t realize this. After thinking about it I realized it “should” also work for Netscape, Mozilla, and SeaMonkey. Also, this fix is only for Windows machines (sorry Mac users).

There Are 219 Comments

  1. Fantastic, thanks!

    This issue is a real pain.

    I hope the next version will address this for good.

  2. I am glad this helped you!

    -Ryan

  3. d’oh i added config.trim_on_minimize as a string how can i change the type?

  4. You should just be able to delete the key you created and create a new one.

    -Ryan

  5. Wow! that’s freakin’ awsome! My mem usage went down from 88 MB after startup (thanks to session saver) to 8 MB with the windows minimized and then to 50 MB after opening everything agian. I have 14 tabs in two windows which is pretty typical.

  6. Yep, it works!
    If it didn’t diminish it as much as lucky Nate, it still cut it down at least in half when idle (even less sometimes).

  7. What a wonderful hack. I love it. Being someone that uses a LOT of tabs, the very simple thing of minimizing and bringing it back, removes MB’s of memory.

    Now its just a shame that we have to do this hack in the first place.

    Great find. I will be recommending this to everyone.

  8. This is an incredibly effective little hack.

    84MB after startup, and that was with only two tabs open, to 2MB when minimized and 32MB when refreshed!

    Kudoes to all involved.

  9. Super hack!
    With my typical ten tabs open mem usage cut from 56mgs to 9mgs on minimize. And…Firefox actually starts faster now:~ )

    Thanks a lot for sharing!

  10. No problem, this actually is a very popular ‘hack’ and can be found in other browsers by default. Opera and IE7 both have this feature enabled without user intervention, so I hope Firefox will follow.

    -Ryan

  11. Thanks for the story, I wrote my own and put a linkback to your site,

    Keep up the good work.

  12. Nice, very nice. Thank you!!!!

  13. This article is shity. Don’t call memory leak what’s not a memory leak.

  14. I CANT beleive this. You are a genius. Many many thanks. Just awesome.

  15. again…IE is still ahead of the rest

  16. Thanks a lot. This was very helpful, went from over 50 mb after just a few minutes of use, then minimized it, it went down to 6 mb. Then maximized it again and it was at only 18 mb. Very nice.

  17. works great thank you :)

  18. thanks for the article.
    i believe this is a feature not a memory leak though.

    @again…IE is still ahead of the rest
    so where do you set how many previously rendered pages are kept in ram in IE? :-)

  19. I don’t see why this is a hack, it is simply utilizing the features mozilla has placed in the firefox browser. I am glad people are finding those features useful though. :)

  20. will you “genius”es stop calling it a memory leak? it isn’t, the memory usage keeps rising because it is holding pages you have gone to in memory so that you dont have to wait for them to reload when you go back and forth… just stop calling it a memory leak and ruining firefox’s rep. and it doesn’t take a genious to look through firefox’s config…

    • I see that you’re not gutsy enough to put in your name, yet you defend Firefox as not having a memory leak. Sorry, but I don’t believe you.
      Here’s what I tried:
      Open Firefox with extensions disabled
      Minimize Firefox

      After being minimized for 24 hours without browsing anywhere, FF memory usage steadily climbed from 86MB to 312MB.

      If that isn’t a memory leak, I don’t know what you call it.

  21. Yep!

    This isn’t a memory link, you’re trading ram for load/rendering time.

    [kb.mozillazine.org]

    And also, tweak browser.sessionhistory.max_entries to a lower value as well.

  22. I am not saying that this is a memory leak, I am simply saying this may help the memory leak.

    -Ryan

  23. Argh where’s the delete option? I made a string.

  24. You should just be able to right-click on the string that you made and select Delete.

    -Ryan

  25. Great hack, man. Works like a charm. Took the liberty and published a portuguese version of the trick [meiobit.com] With a full source acknowledgement, of course.

  26. Thanks man, it is always good to get articles in as many languages as possible :) .

    -Ryan

  27. Firefox does contain a memory leak. Because as you visit pages and add tabs the memory usage skyrockets, and never goes back down, till the point it causes the browser to crash. I use upto 40+ tabs at times and saw the memory usage above 240mb on occastion with an equal amount of virtual memory usage.

    Also intresting to point out with this hack, mind you Mozzila encourages the use of this word on there website [mozilla.org] is that if you have added counters for i/o reads and i/o writes, it will not access the hard drive very much. On my system it never read even 1mb from the hd and i actualy looked at every tab to make sure it wouldnt load them as i access them.

    And for the person pointing to the mozzila developer page
    [kb.mozillazine.org]
    I suggest you go back and read the bugs at the bottom of that page

    [bugzilla.mozilla.org]

    [bugzilla.mozilla.org]

    My advice is go with Opera 9 there beta builds are rock solid right now with weekly updates sometimes twice a week!!!

    And it has passed the Acid2 test unlike most browsers.

    [my.opera.com]

    [howtocreate.co.uk]

  28. Mine was sitting 72 megs. I minimized, it dropped to 6 immediately. On bringing it back, it was at 14.

    This is awesome.

    To those at Firefox who claim there is no memory leak: Explain how with 5 tabs your browser takes up 286 megs on my machine then please. (And that’s with all the known memory hogging extensions removed.)

  29. Will this cause all extensions to stop functioning since the whole app is transferred to the HD, or will Gmail Notifier and the likes still work?

  30. All of the extensions should still function properly because not the WHOLE Firefox is transferred to the hard drive. It is always easy to revert back if it doesn’t work for you, so give it a shot.

    -Ryan

  31. Yeah, I guess you’re right. Giving it a shot won’t hurt too much. :P

  32. According to [developers.slashdot.org] the memory leak is not a bug it’s a feature.

  33. Yeah, that is what everyone says, but after you disable that feature you will notice that it doesn’t help. I wish the issue was as simple as that though.

    -Ryan

  34. HUGE difference!! Thanks!

    Derek Hampton
    SouthBeachCasa
    [southbeachcasa.com]

  35. excellent, now here is an english hack for you… anyway never ends in an s.

  36. A memory leak is when allocated memory is no longer referenced, without being freed. Thus, even after you exit the program, the OS still thinks the memory is in use, when it’s NOT.

    Firefox does not have a memory leak. Firefox is a memory HOG, for sure, but it’s not a leak. Please stop causing confusion by using an incorrect term for what is happening.

  37. A memory leak is when allocated memory is no longer referenced, without being freed. Thus, even after you exit the program, the OS still thinks the memory is in use, when it’s NOT.

    Really? Where’d you get your CS degree? Better go get your money back… The OS will never think any memory is still allocated after a ‘leaking’ program exits. Never. Not even Windows. All memory allocated to the process is freed, regardless of whether the process itself was able to keep track of it.

    Firefox does not have a memory leak. Firefox is a memory HOG, for sure, but it’s not a leak. Please stop causing confusion by using an incorrect term for what is happening.

    You’re half right here. This problem is not a leak, but I can guarantee that FF does have memory leaks. Very few C/C++ programs are ‘leak-free’, so while you’re right about the cached pages not being a leak, your statement that FF doesn’t have a memory leak is patently wrong. There are leaks.

  38. This hack destroyed IE Tab icon in my forefox

  39. Sweet. Can you explain what does config.trim_on_minimize mean and where else can I find more preference settings other than on mozilla.org

    Thanks.

  40. the one thing i dont understand is why dont people count the VM Size column too.

    applied the hack, and it seems to work allright, firefox trims to ~1.5mb on minimize, then grows up to 11mb again and stays somewhere in there.

    but the VM size column sits the same (read: 60megs+, with maxviewers set to 2), and I assume while this hack would help me keep firefox open for more time, it would probably end up committing its memory leaks to the swap file so gradually increasing that bit by bit.. nice hack, but i think we need more than that.

  41. WOW! Thanks for this, might make me finally make the switch to firefox, it always [used] to hog too much memory to be useable!

  42. This is a lifesaver. Thanks.

  43. This sounds very helpful to me. Good effort on this piece of information. My memory resource is very limited on my computer and I am trying hard to keep applications running to a minimum.

  44. Also the Clear Cache Button extension can remove 50mb in a click.

  45. didn’t work on my firefox 1.5.1 on OS X 10.4.6
    bummer.

  46. The guy who said that Windows apps can’t have memory leaks needs to check his basement for ram puddles.

  47. The guy who said that Windows apps can’t have memory leaks needs to check his basement for ram puddles.

    That gave me a good laugh :D .

    -Ryan

  48. None of the things you’ve listed are actually “memory leaks” — bloat perhaps, but not leaks. We hold on to a lot of data to try and keep the browser fast, but very little of it actually leaks.

    That said, there are some extensions that do cause real leaks and we’ve been working hard to resolve many of them.

  49. hey,

    my firefox is in my native language, and not english. could you please tell me which one is the “BOOLEAN”??

    (top, middle, bottom)??

    Thx

  50. The problem is only to a limited extent a memory “leak” the problem is *really* memory fragmentation. If you keep your browser open for days (as I do) and visit lots of pages (as I do) then you can slowly watch firefox’s memory usage creep up to several hundred K (you can watch it using vmstat or top under linux). Once it hits 60-70% of physical memory the machine will start swapping. These are almost always swap-ins as the memory manager (a combination of the garbage collector and/or the C “malloc” manager) goes throught the heap looking for memory to allocate.

    The problem even happens when you “Quit” from firefox — I’ve seen it take 15 minutes (on a Pentium 4) to close 20+ windows (150+ tabs) — all because its trying to free up memory and organize it into one large “chunk” before freeing it completely to the OS. This is ascerbated because Linux doesn’t seem to page-in the pages required at a rate as high as that the disk will support — this is a Linux tuning problem — it can be helped by tuning vm.swappiness but that isn’t a complete solution.

    The best solution I’ve found so far is to use the “Session Manager” extension to allow you save entire sets of sessiosn, then Quit Firefix and restart it and all of the windows & tabs. You will generally see a much smaller use of memory after restarting it.

    The problem will not be solved until they rewrite the internal memory management code to do more memory/cache management within the browser. It may be helped somewhat with the Bookmarks/History rewrite which is supposed to be in 2.0 — history records and bookmarks presumably grab a memory chunk every time you visit a page or add a bookmark and presumably contribute to the heap fragmentation. What needs to happen is the browser needs to use mmap() to create a private memory allocation heap for each page that you open — then when you close that page all of the memory gets returned to the operating system (presumably you want the history memory and bookmarks memory in their own private heaps as well). But the architecture as it currently stands is simply flawed by assuming that you can allocate & deallocate memory from the heap without being intelligent about it.

  51. I have written my observation about this hack in my [arun-prabha.com] I think this hack works only for a short time.

  52. This only works under windows.
    On other OSs it does nothing.

  53. Thanks for that fix – nice to have when you’re running lots of programs daily.

  54. Makes exactly ZERO difference for me. Perhaps this only works with windoze?

  55. This article has been of great help to me. Thanks for posting.

  56. Robert Bradbury,

    Very insightful comment, thanks for the information.

    -Ryan

  57. Nice hack. No matter what you call it.

    I don’t anticipate deleting, but tried as test, and do not get a delete option when I right mouse click it. Am I missing something? You mean while at the about:config screen, yes? where it says “user set/boolean/true”?

  58. Sorry, I could have sworn there was a delete option, but all you have to do is toggle the value to false.

    -Ryan

  59. Same comment as 43 (george)

    It changes nothing.
    the VM size remains the same.

    the difference in Mem usage and VM size the working set size. It is the amount of physical memory which is directly allocated to the process.
    VM Size – is the total private virtual memory allocated to the process.

    Mem Usage is not a measure of overall memory usage. It is VM size you have to check.

  60. I confirm the comments 43 (George) and 62 (Jean-Philippe).

    To be added that the total of charge (indicated at the bottom of the task manager window) is not changed at all.

  61. you rock! this has saved me a least 100 mbs of average ram use. very very cool!!

  62. It’s great that after I applied the hack, a reduced window drops memory down to about 2mb when otherwise without the adjustment no memory would be freed at all. But almost everyone is saying that the browser has been taking up 80mb+. For me, an open browser starts at 30mb and add another 2mb/tab. After closing the tabs, it stays at 40. I don’t seem to experience such huge ‘memory leaks’. I’m just saying. Please don’t get offended somehow.

  63. Works in Thunderbird too! Under options go to the Advanced tab and the click the config editor, it will give you about:config. Then just do the same exact thing!

    Now Thunderbird + Tbtray takes up only ~10MB of memory at the most! Beat that Outlook!

  64. This is grrreeat! Thanks!

  65. Hi……..
    Nice Trick..
    Really it helps me a lot to block memory leak..

  66. Wow! Thanks for this little tweak. I can get Firefox to go down to only 4MB of memory usage when minimized with 4 tabs open. :D

  67. this helped quite a bit. Firefox even opened faster….because I set the trim on minize first, exited, then re-started when i saw the max total viewers tweak.

  68. it doesn’t quite work for me but oh well.
    Someone Pleeeeeeeaaaaaaaasssssseeeeeeeeee file a bug about this specific about:config entry to be enabled by default in Bugzilla (or I can do it for you)

  69. never mind my comment (71), this thing is freaking awesome.
    Did I tell u, I LOVE YOU ?

  70. I am glad that it works so well for you :D .

    -Ryan

  71. Tried it…
    Worked fine memory wise…
    But FF forgot all my saved passwords…
    When looking in Tools>Options>Privacy>Passwords FF had no saved passwords…
    Chose to show saved passwords…
    Did not even question if I wanted to show my passwords…
    And the inline frame came back with just the list of my user_names no passwords or urls associated with them…

    Reset the config back to false and all is the same as it was…

    Any work-around for this…?

  72. Very odd, I haven’t heard anything about that before. Sorry, can’t help you.

    -Ryan

  73. I tried this fix. It worked, if your criterion is minimizing Firefox us of ram, but then Firefox crashed repeatedly afterward–4 times in 15 minutes. I wasn’t smart enough to delete the line in about:config so I had to uninstall firefox and then reinstall. That got me back to where I was.

    Am I missing something?

  74. No, you aren’t missing anything. I was mistaken thinking that you could delete the key, but all you have to do is disable it by changing the value from true to false.

    We have had no other reports of this happening, but it could be a conflict with another extension.

    -Ryan

  75. Works great. Thanks alot! :)

  76. Works well but session saver (which I find very useful) no longer works. I tried reinstalling and it still isn’t working. Be warned if you use this extension.

  77. Jim,

    What if you try using Tab Mix Plus. It has Session Saver built into it and I don’t have any issues. Hope it helps.

    -Ryan

  78. Didnt’ look at the before or after numbers, but… if it helps y’all, I’ll do it! LOL

    Got 2gig, on one box and 1gig on the other and use both Firefox & Thunderbird….

    Thanks for the work-around!

  79. [support.microsoft.com]

    READ IT. Most windows applications trim there memory usage when minimized. Try it out for other programs like OPERA and outlook.

    [kb.mozillazine.org]

    If your intrested on why this hack wont work on linux go [zeroc.com] And read the second to last paragraph.

  80. wow. this is sexy

  81. Very cool!

    My initial memory was: 78%
    After hack: 65%
    With 32 “TABS” open (yes, I am a TAB freak)

    Very cool!!! :)

  82. I got another great link with some FF tweaks/speed-ups:

    [64.233.183.104]

    Maybe it can help you all in speeding up FireFox, it helped me.

    Keep up the good work!

    Jos
    The Netherlands

  83. This is great! Good tip!

  84. This was a feature of firefox I remember from a long way back, but it never seemed to surface. Anyhow, I’m not sure what you guys are used to, but I’ve got two old computers here the faster running Fx 1.07 and slightly slower running 1.5.1 and a ton of plugins. For some reason 1.5.1 on this system seems to work great… much faster than 1.07 and very easy on memory usage comparatively. I had to reboot my system the other day and then I discovered I had a Fx window left open I didn’t notice with 65 tabs open, lol. I must have had it open for a couple weeks judging from what the first few tabs were. Anyway, maybe I’m just used to struggling to get by on the memory I have with only a few programs at a time open. Good tips though, especially on using Session Saver… I use the Session Manager that comes with Tab Mix Plus and I love it.

  85. As Neo says in The Matrix: Whoa.

  86. Just buy more ram cry bitches

  87. This is a good trick for FF. :)
    Thanks :)

  88. Doesn’t seem to work on OS X

    :(

  89. Yes, it still frees a lot of RAM with Firefox 1.5.0.2 … a really valuable tip!

  90. Great hack, thanks a lot. One question, though:
    I have the MinimizeToTray extension, which as the name states, minizes FFx to the system tray. Even if I have this extension, will this hack work? I imagine it will, since I’m still minimizing FFx, even if it’s not to the task bar.

    -JaDe42

  91. Also, I forgot to mention, when I click on New > Boolean and I add the config.trim_on_minimize and make it true, when I go into the about:config page again, I look for config.trim_on_minimize and it shows it as been a string instead of a boolean. Help?

    -JaDe42

  92. The minimize-to-tray Firefox extension shouldn’t be a problem. You could watch the amount of memory Firefox is taking up by pressing Ctrl-Alt-Del and selecting the Processes tab. Then locate Firefox and see if the amount of memory changes trastically when you maximize and minimize.

    The issue that you are having with the config.trim_on_minimize being a string is unusuall. I don’t know why Firefox would be changing it for you.

    -Ryan

  93. I’m trying to re-add the config.trim_on_minimize object to my about:config page as a boolean type, but I can’t. Everytime I do it, it just turns it back to a string object. Is there NO WAY to delete the config.trim_on_minimize string object I already have? =\

    -JaDe

  94. Sorry for douple-posting yet again but, I finally got it to work. I decided that since I couldn’t do this hack through the about:config, I would just do it in my user.js file. So I did, and it worked! Yay!!

    For anyone interested in doing this too, here’s how to do it:
    Go to Start > Run. Type %AppData% and press enter. A Windows Explorer window showing your Application Data folder should pop-up. In here, click on the folder named Mozilla > Firefox > Profiles > XXXXXXXX.default, where the X’s are a random string of numbers and letters. When you are inside your XXXXXXXX.default folder, create a file in Notepad and type this in it:
    user_pref(“config.trim_on_minimize”, true);

    Save it as user.js and file and voilá, all done.

    -JaDe42

  95. Thanks for posting your solution. I am sure it will help a few people out.

    -Ryan

  96. No problem. You helped me by providing me with the hack, so I thought I might as well help too by showing you how I solved the problem I was having. I mean, I already went through the trouble of solving it, why not post the solution to help other people? =D

    -JaDe42

  97. Great hack, thanks so much! :)

  98. Great fix! It was becoming a pain having to close firefox.

  99. I played with it. My memory usage for Firefox with 20 tabs open is usually c.a.40 MB. After the tweak it showed 11 MB when minimised but went up to 27 MB after a short while. Maximised use 16 MB but went up to 36 MB after a minute or so.

  100. Thanks, Youre Great!

  101. Thank-u so much…got back at least 50% of my memory back…..

  102. After applying the hack I opened Firefox and the task manager and I notice that even though the RAM decreased after minimizing/maximizing it began to grow and grow slowly and I only had the Google page opened… it went from 12MB to 15MB and growing… is it normal?
    Regards.

  103. Yes, it is normal for it to grow slightly, but it will often not grow all the way back to the full amount.

    -Ryan

  104. Thanks for your answer Ryan.. I noticed that it grows but not to the same amount of RAM before. Regards.

  105. Thanks Ryan. That sure helped me a lot. You surely made my day…

  106. THANKS RYAN!! you are the man ;)

    The only change I have done is to the max viewers number as when I did set to 0 it didn’t load some sites properly (specially flash ones) and I just increased the number to 1 user, now everything works perfectly (I have been checking with the Task Manager memory usage every time I opened a new tab and closed them and all goes perfect)

    As all the other users say thanks for the work and help you have provided us.

    All the best!

  107. No problem. I am glad it worked out for you!

    -Ryan

  108. Is that string in the js file
    user_pref(”config.trim_on_minimize”, true); or

    user_pref(”config.trim_on_minimize”, true); without the semi-colon at the end? Thanks Dave

  109. Oops that should have been
    user_pref(”config.trim_on_minimize”, true) without the semi-colon

  110. So, this config option seems to work just fine. But then after FF has been minimized for a while, I note that the memory usage (accorging to Windows Task manager) has boosted back up to where it had been before. (One tab open, 90K memory!). Why?

  111. This tweak does not fix the memory leak, it tries to make it less noticeable by moving some of the memory that firefox is using to the hard drive. Eventually a lot of the data that was moved to the hard drive will get moved back to the memory unless you maximize and minimize frequently.

    -Ryan

  112. ***JD42****
    Is that string in the js file
    user_pref(”config.trim_on_minimize”, true); or

    user_pref(”config.trim_on_minimize”, true) without the semi-colon at the end? Thanks Dave

  113. This also solves the alt+tab-after-minimise problem! Super nice.

  114. tony bandero: Hi – I’m just making a programmer’s guess here, but what I think is happening is this; the cache clearing algorithm is pants (well, buggy), so memory usage ratchets up with each page you visit. When you use this hack, the cached memory is periodically stored to disk and then resumed to RAM – this visits some branches of the cache reclaim algorithm in a different manner, and misses the bug, junking all the rubbish pages; a ‘magic fix’

  115. This trick / hack / whatever you want to call it fixed my leak / inefficiency / whatever you want to call it! I went from using nearly 250MB with 12 tabs to sub 80MB. I use the Auto Refresh function, which I’m sure exacerbates my memory usage, so this program is a lifesaver. I’ll just minimize FF each evening before packing it in and it won’t be frozen in the morning when I return.

    Great job. I hope Mozilla gets this bug fixed in the next release.

  116. gwhizkids,

    So far I have been running Firefox 2 (currently in the testing state) with very minimal memory leaks so I think they may have fixed some of the bugs that cause the most common memory leaks.

    -Ryan

  117. I think freeing up physical memory when minimizing apps is a default windows behaviour, which used to work with earlier firefox versions, so I guess it was intentionally changed in firefox, with whatever reason behind.
    The hack is great, even if you find drawbacks, you can change the boolean to false, but leave the variable there.

  118. thanks a lot ryan! u helped me a lot wit this hack!

  119. firefox has taken 150MB of my RAM :evil: with only one tab and no extensions installed. hope they will fix it in next release

  120. I have had very few memory leaks using Firefox 2 Beta 2 so I am sure they solved many of the problems.

  121. I tried this pref on my Fx2.0RC1, WORKS LIKE A CHARM!

    ZERO visual negative performance impact, protects my RAM from this memory-hungry giant, hopefully Fx’s excessive memory usage will be further repaired in the 2.0 release ;)

  122. AWESOME!

    Ryan and JaDe42……you guys rock!

    I have a system that had half a gb of 400 mhz DDR 3200 RAM……But after running Tbird and FF the system ran SO slow,…found that TBird and FF were really eating memory…as in ALL my memory! Between the two they would rack up something like 400 mb of memory or MORE! So my system was basically running off of virtual memory all the time…..I stopped using FF for a while and the problem decreased but the system still ran like crap after Tbird was opened for a while…..so I did what some troller wrote — I bought some more memory….upgraded with another full GB. So the system has 1.18 GB of memory….runs much better, but I saw that the two Mozilla products were STILL eating up memory and things started slowing down.

    Found you guys’ fixes and in no time at all, I think the problem has been diminished…at least now I can minimize them and get the memory back!

    I used Ryans approach for FF and J’s apporach for TB….

    Awesome guys!

    By the way, this is on FF version 1.5.0.7 and TB 1.0.7

    Shadango the grateful

  123. Thanks man! I’ve used this and it really helps! :)

  124. Your Welcome! I still use this in Firefox 2 even though the memory leaks are much fewer. That way I know if I need some extra memory that I just need to minimize my browser. Enjoy!

  125. Sounds good in theory, but doesn’t work. I’m on Windoze, and though my 180MB dropped to 73MB, after ~10 seconds of being minimized, it jumped back to 180MB and stayed there. Rinse and repeat gives the same results.

    10 seconds of work just isn’t enough for me. Here’s to hoping they can make it less of a hog in general…

  126. I’ve been testing out Firefox 3 which won’t be released until late this year, and the results seem to be much better. The memory usage is normally at a respectable 100MB.

  127. This sadly doesn’t work for Windows 98 (in case anybody wonders) :?.

  128. thanks a lot ryan! u helped me a lot wit this hack!
    rede banner troca de banner gratis

  129. I assume I can check the mem usage by going to the task manager, but if my assumption is incorrect, where do I go to find it? Vista Home Premium

  130. You’re completely right. The easiest way to bring up the Task Manager is to just right-click on the Taskbar and select the respective option. Then just look for Firefox in the processes list.

  131. this option allows windows to SWAP out the memory. to the swap file. its still using the same amount of memory. still, good for people with tiny amounts of ram.

  132. Fantastic!
    7 tabs open – went from 111MB to 8.5MB
    Very nice!

  133. I’ve been using Firefox for 2 years now and it took me a lot of effort to stick with it at the beginning. But now I’ve had it with this junk browser; don’t get me wrong, there are a lot of features that I admire and cannot live without but when it comes down to being a system hug, nothing beats Firefox. It doesn’t load pages with ample amount of comments i.e. this page or any page that has 100′s of comments on it. To the contrary, IE 6+ loads the same page in less than a second. I don’t know if the browser attempts to reconnect for every piece or just have a down right inadequate “rendering” capability. Most of the plug-ins such as Adobe Acrobat go haywire or crash FF after every update. I’ve had FF 1.0 up to 2.0.0.10 at this very moment and they all, without an exception, leak memory to the point where I have to utilize that redundant minimization technique. I’ve tried to turn off most of the plug-ins and what not in vain. There is no use…

  134. Wow! It is awsome! Right as you said!

  135. I loved this feature on my old XP machine, but it’s not working at all on my new Vista one. I’m assuming it’s a problem only with Vista. I followed the directions to a T, just like I did on XP, and there’s no change upon minimization. This was my favorite thing to ease the Firefox bloat.

  136. Kevin wrote:
    I loved this feature on my old XP machine, but it’s not working at all on my new Vista one. I’m assuming it’s a problem only with Vista. I followed the directions to a T, just like I did on XP, and there’s no change upon minimization. This was my favorite thing to ease the Firefox bloat.

    Vista reports memory usage differently than XP does, and so it is likely that it’s still working but you don’t see any differences in the Task Manager.

  137. It really works! Thanks for sharing this one.

  138. Can this hack be used with FF3? i had trouble doing searches. ram usage boost to 200mb with 5 tabs open.

  139. Doesn’t work for me in FF3

  140. Using FF3 and not working either, but maybe it’s a Vista 64 issue as I’m sure it works on my XP machine at home.

  141. Using FF3/Ubuntu and not working. :cry:

  142. Nice :).

  143. Close but no cigar. It works but after a few seconds the memusage goes back to previous level.
    For example: before: 160,000K after, after minimize: 30,000K, seconds later: 150,000 and rising.

  144. My Firefox left running over night takes up over 1.3Gb of RAM. I can tell you things slow down…..lots, even on a Quad Core with 4Gb of Ram and 2TB hard disk space. This fix seems to be a message from heaven, an angel has landed and fixed Firefox. Even if it frees up a little ram (It has) it stopped my PC stuttering to a halt. Thank you..you have earned your wings…but don’t be like Icarus and fly to close to the sun…one step at a time yeah!!

  145. does not work in vista

  146. I just tried this, close FF, restarted..opened SO much quicker! Usually I click on my FF icon and go get a cup of coffee and (if I am lucky), when I come back the browser is open. My real problem is that I LOVE tabbed browsing..but my FF VM size increases to 700,000K in no time at all, then I have to use the task manager to close FF and then click on the icon again etc etc, at least once per hour I have to do this…
    I am SO hopeful that your little trick works for me..
    Annette

  147. Does anyone know why my cpu usage is running at 59% on average with firefox, but barely showing up with IE. I am new to firefox, but I like the SEO options. I keep a lot of tabs open, and it is shutting me down after about an hour or so. I have to restart to get the lag to go away. The thing I am seeing though is that my memory usage isn’t that bad for a six gig system, but the cpu usage climbs until my computer feels like it is cooking my legs. It is a 3 ghz core 2

    • @Chris Owen if its crashing on a 6 gig system, my suspicion is that its probably a plugin / add-on or an exceedingly poorly coded site. However, you’d probably find a better answer in a mozilla / firefox forum. Also, when you post that question, it would be helpful to include OS (i.e. Vista 64bit), Firefox version (3.6RC1) and also verify that this happens without addons. (There is not currently a good way to thoroughly test extensions / addons so many times they are the culprit.) My boxes don’t have a third of your power and I’ve not ever ran into your problem, but you might want to specify exactly how many open tabs is ‘many’. Seven is ‘many’ for some while 32 is ‘many’ for others. I usually have under 20 tabs open which will bog down my 3.5.7 version (which has way too many plugins) but not my 3.6RC version which I run on a stripped down ‘lean n mean’ profile. Neither however requires a reboot on my old XP machine.

  148. Wow, Nice Fix. My FireFox was using nearly 650 MB when I open some 8-10 windows. Now is taking less than half of that. Thanks a lot.

  149. Great tip!
    Tested with Firefox 3.6.3 in Windows Server 2008 R2 SP2 Enterprise

    Thank you Ryan.

  150. Fantastic!
    Gone from an average of 550Mb to 155mb over the last week. Thanks for the excellent tip – you are the man!

  151. Hi Folks,

    This trick doesn’t fix any memory leak. It simply reduces the working set of the application. This trick will work for any application in Windows that is relying on Windows Virtual Memory functionality to handle large scale memory usage. When you minimize the app, Windows puts everything that isn’t required in memory on to disk. When you restore (un-minimize) Windows will only load (as needed) the pages required to do work, so for many situations you will see this improvement.

    But its not a fix for a memory leak.

    If you do need a fix for a javascript memory leak, JavaScript Memory Validator can help you. [softwareverify.com]

    Ricky

  152. [digg.com]

    I just give up, really… I’ll still use firefox but the memory thing has got to be fixed.

  153. Thank you! Excellent fix!

  154. Firefox Please Stop Being Lazy

    Firefox needs to be fixed but so far the team that works on it has NEVER attempted to fix the memory leak, either they just don’t care or they don’t have the skills needed to fix it. Firefox team can go suck a shotgun for all I care, I’m going to google chrome cuz Firefox lags systems way too much.

  155. THAT’S PERFECT! THANK YOU MAN! :)

  156. Ahhhhhh. Thank you!

  157. This didn’t work for me on 3.6. What did work for me was getting rid of Google Toolbar and the Java Console.

  158. I had a similar issue with FF 3.6.9 where the memory usage would go way above 1GB, and I tried the above fix but it didn’t work. Before this I found another solution which was related to java. But that didn’t work either.
    Then I realized that I didn’t have this issue until recently and the only thing I did was, I installed an addon called “Page Tweaker” or somethin.. so, after I removed it, Firefox just went back to normal. So, I would you do the same.. (Try disabling some addons that you installed recently)

  159. Great – many thanks to the Master !

  160. You freakin rock for posting this!!! …this small tweak alleviated all of my bottlenecks. I was terrified for some time that it was firebug (which i cannot live without). Thanks for the help!

  161. Hi, I have the same symptoms that Nick above ; I’m under Windows vista FireFox v. 3.6.10 ; buggy appears after auto-update to this version…! It’s impossible to fix “browser.cache.memory.capacity” it takes actually more than 1Go of RAM !!!
    any idea to resolve or turn around …?
    Thanks …

    • Hi, with ( ~500Mo RAM used ) it seems better by :
      – enable plugin or extention :
      - noscript extention

      – disable plugin or extention :
      - face-plus
      - youtube downloader for facebook
      - adobe acrobat
      - google talk video accelerator
      - google update
      - windows presentation foundation
      - VLC

      Hope to help …

  162. I tried this solution but noticed the pages load slower, it did reduced the memory usage but I guess the trade off is slower loading for FF :(

  163. Outstanding. It worked for me. The usage dropped about 60% when minimized and maximized. Still trying to figure how to do this with Thunderbird. Thanks for the insight!

  164. This is an illusion only. It does not change the allotted memory by a single byte. It just forces it to swap to disc, and waste time doing it. And don’t bother tinkering with history either. It’s really not worth it…

    You are better off disabling addon to find the culprit

    see here [kb.mozillazine.org] & [kb.mozillazine.org]

  165. Hello All,

    I did this setting but looks like no use..I still see firefox using around 400+ MB Ram & there are 31 tabs are open.

    thanks,
    Amitabh

  166. tried just these two and it worked great, thanks! there is another more comprehensive list of fixes elsewhere, feeling lazy, these two worked a charm! thanks

  167. Works on 6.0.2! The BEST hack for firefox ever. 160mb down to 9mb while minimized, to 77mb when maximized.

  168. All firefox is doing here is calling SetProcessWorkingSetSize ([msdn.microsoft.com])

    That does what is described in this article [support.microsoft.com]

    So, by doing this you are telling Firefox to to page all your inactive memory to disk, you are swapping Memory usage for disk I/O and undoubedly causing lots of page faults.

    If the OS needs more free RAM, it can figure out which memory hasn’t been used lately and page it out. That might be from your program, or it might be from some other program. But if the OS doesn’t need more free RAM, then you’ve just forced a bunch of disk I/O that nobody asked for.

    Basically, unless you are reducing the Virtual Memory size (private memory), you are not achieving anything – all you are doing is slowing down Firefox!

    But oh well, ‘it looks smaller in task manager’, even when you’re not looking at the right column. :)

Leave Your Comment


Message is the only required field.
Emails are not published.