Firefox People! Memory leak fix....finally!

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

NFS4

No Lifer
Oct 9, 1999
72,636
47
91
set to 60000, browser is currently using 115000

So much for the "fix"
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
If you look at the source code that reads that preference, it really looks like that fix is entirely bogus.
1259 /**
1260 * CacheMemoryAvailable
1261 *
1262 * If the browser.cache.memory.capacity preference is positive, we use that
1263 * value for the amount of memory available for the cache.
1264 *
1265 * If browser.cache.memory.capacity is zero, the memory cache is disabled.
1266 *
1267 * If browser.cache.memory.capacity is negative or not present, we use a
1268 * formula that grows less than linearly with the amount of system memory.
1269 *
1270 * RAM Cache
1271 * --- -----
1272 * 32 Mb 2 Mb
1273 * 64 Mb 4 Mb
1274 * 128 Mb 8 Mb
1275 * 256 Mb 14 Mb
1276 * 512 Mb 22 Mb
1277 * 1024 Mb 32 Mb
1278 * 2048 Mb 44 Mb
1279 * 4096 Mb 58 Mb

1280 *
1281 * The equation for this is (for cache size C and memory size K (kbytes)):
1282 * x = log2(K) - 14
1283 * C = x^2 - x + 2
1284 */

You're setting it to a higher value than what it would have if you had 4GB of RAM.

edit:
I asked a developer who knows much more about gecko than I do...
<biesi> I don't understand how setting the memory cache to _sixty megabytes_ helps
...
<biesi> but 60 MB is way too high
...
<biesi> you should also mention in that thread that not all the memory that ffox uses is for the cache
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
I also use flashblock, and have had no issues in 1.0.6 (though I found 1.0.5 to be unbearably bad at eating RAM).
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: Cerb
I also use flashblock, and have had no issues in 1.0.6 (though I found 1.0.5 to be unbearably bad at eating RAM).

If you saw the complete list of code changes between 1.0.5 and 1.0.6 you'd understand why developers are very skeptical of user-reported memory leaks. (It's less than 70 lines of code changed, 26 that don't count because they were a change which was undone, 11 of which were to bump the version number... the rest are mostly security fixes which get very carefully reviewed).
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Well, I don't know what all was changed, and never noticed any leaks (closing got rid of things just fine, but is too slow once HDD swapping starts). Now, with the same settings, I can open up over 100 tabs (pretty common for going over news), and still not be swapping, where 1.0.5 ate up my 1GB after 50 or so (I'd be swapping before I was done opening topics from the GH and C&C forums!).
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
pic ... I believe that was v1.0.4 or even earlier since it's from May. I had opened up quite a few tabs (maybe 30) with images on them... then closed them all up again leaving the single browser/single tab... memory was still being used. I believe the problem still exists.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Originally posted by: rh71
pic ... I believe that was v1.0.4 or even earlier since it's from May. I had opened up quite a few tabs (maybe 30) with images on them... then closed them all up again leaving the single browser/single tab... memory was still being used. I believe the problem still exists.
Ouch! Definite leakage.
 

0roo0roo

No Lifer
Sep 21, 2002
64,795
84
91
well iget up to 50 tabs quite easily..over a few windows of course. firefox tends to eat about 160mb of ram after a few days of being up with loads of tabs. doessn't really climb beyond that for my usage though. hard to complain too much when you got 1+gb standard these days
 

thedealmaker

Senior member
Jul 10, 2003
278
0
0
I used the same fix, but it didn't work.

Here is a better workaround:

MINIMIZE your firefox! Don't believe me? Go to task manager, look at the firefox memory use, then minimize firefox window, then check it again, it drops from 250mb to 4mb!!! I am loading around 15 tabs. But the weird thing is that the memory will creep back up slowly even if you are doing nothing more than sitting there looking at the firefox memory usage.

But I think that this is the best workaround for now whenever you find that your computer is writing memory to the harddrive too much and too slow, it's better than restarting firefox even if you have sessionsaver.

This link may explain why it works: http://support.microsoft.com/default.aspx?scid=kb;en-us;293215