Mozilla MemShrink Set To Fix Firefox Memory
darthcamaro writes "If you're like a lot of Firefox 4 users out there, you've probably noticed that Firefox has a serious memory problem — it uses more than it really should. At long last, Mozilla developers are finally set to take this issue seriously with a dedicated team called MemShrink that are focused on the problem. 'It's pretty clear by now that this is a much bigger problem than any one person can likely tackle,' Mozilla Developer Johnny Stenback said."
Any gains they make will be eaten up by the rapidly increasing version number.
Don't be a Chrome Clone, make the next release Firefox 4.1.
Bundle in MagnaRAM with Firefox.
A lot of it's got to be the increasing size of web pages in general. Now that most folks have higher bandwidth connections, web designers don't focus on keeping the download size small.
Multiply that increase by the size of your cache (how many times can you click "back" without hitting the disk?) and you can see the full scope of the problem.
There's no -1 for "I don't get it."
My experience has been that both leaks and overall memory use have gone down between 3.0 and 4.0.
At the moment, Firefox is at about 375 megabytes, with 16 tabs open. It has been open for 3 weeks. I do have browser.sessionhistory.max_total_viewers set to 3 and the anti-malware databases disabled though.
Nerd rage is the funniest rage.
A useful new feature in latest Nightly versions from Mozilla is about:memory. It gives you a full tree view of where the memory is being used. Of my 360MB which the browser is currently using, 101MB is JS, 46MB is storage (you back button and memory cache), 70MB on "heap-unclassified" whatever that is. JS seems to be the biggest consumer of memory.
OS X here -- I usually have 8 to 12 tabs open. I almost never see memory usage below 500M, and it usually grows to about 1G after 2 or 3 hours. Firefox 4 for the Mac is seriously broken w.r.t. memory usage IMHO, and if they can't fix it fast, I'll probably be switching. I clobbers the performance of the whole system when it hogs that much memory. I'm tired of having to restart FF all the time.
Yay, it only took 5 years of bitching for them to actually look into it instead of blaming addons or your profile.
Your hair look like poop, Bob! - Wanker.
This is easily reproduced in FF4 when you load a page with lots of images. The mem tends to grow proportionally to the size of the images on the page. But this is the only scenariou where the mem usage is different from other browsers and needs looking into.
I think at least part of the problem is perception. Most people seem to have this mindset that using RAM is bad, and the more memory you have free and unused the faster your computer will be. These are the same people who think they're increasing their computer's performance by turning off superfetch, etc.The problem with this perception is that it's completely stupid.
Programs load data into memory because memory is fast and your disk and the network are significantly slower; hundreds or thousands of times slower, and pointlessly unloading the data from memory increases the risk of having to go back to the slower disk or network to retrieve it later. If you still have RAM available, it is actually detrimental to your system performance to free this data.
Now, when you're running out of RAM there is a problem, the operating system and applications should begin to free data that is the least likely to be useful in the near future to make room for whatever is needed at the moment. If Firefox has a problem it isn't RAM usage, it's that it isn't paying attention to global system memory levels and caching less aggressively when there is RAM pressure, and honestly I wouldn't know if that IS a problem because I have way more RAM than I've ever seen my computer manage to use.
I hope this isn't just targeted towards firefox. Thunderbird is an unwieldy beast of an email app as well. No good reason that checking my email should involve consuming 200Mb of memory.
ôó
Looks like the Url Classifier (worthless anti-phishing feature) is eating up a fair amount of resources for nothing. You look in your user profile, and you see the urlclassifier3.sqlite file keep getting bigger and bigger for no real reason, and you see that Firefox needs 24MB of RAM just to have it loaded and working.
Here's my list (sorted top 25, but may be misleading since some of the numbers look like sums of others)
win32/workingset 432,160,768
win32/privatebytes 420,995,072
malloc/committed 376,307,712
DescriptionValuemalloc/allocated 354,080,976
storage/sqlite/pagecache 79,423,848
js/gc-heap 66,060,288
storage/places.sqlite/Cache_Used 52,400,928
storage/urlclassifier3.sqlite/Cache_Used 24,250,888
js/string-data 7,282,684
layout/all 6,261,185
images/content/used/raw 4,043,747
images/content/used/uncompressed 3,444,586
gfx/surface/win32 3,398,208
storage/sqlite/other 1,589,512
malloc/dirty 1,097,728
js/mjit-code 913,507
storage/cookies.sqlite/Cache_Used 528,376
storage/formhistory.sqlite/Cache_Used 508,664
storage/extensions.sqlite/Cache_Used 494,144
storage/addons.sqlite/Cache_Used 362,512
content/canvas/2d_pixel_bytes 360,000
images/chrome/used/uncompressed 353,440
shmem/allocated 344,064
shmem/mapped 344,064
There are several things going on here:
1) JS JITs. These optimize for speed of compilation and speed of generated code; small size of generated code is not really something being optimized for except insofar as it helps one of the other two metrics. In the case of Firefox, just deciding to JIT a little less aggressively late in the 4.0 cycle saved a good bit of memory when JS-heavy pages are open.
2) Images. Sites are using more and more bigger images, in addition to larger and larger scripts. With images you have the options of decompressing on draw (slow, typically) or storing decompressed images in memory (uses lots of memory). Guess which one browsers are typically doing?
3) Leaks in webpages. By this I mean web pages that allocate more and more JS objects and have them all reachable (e.g. by sticking things in an array that's hanging off the Window) so the web page uses more and more memory. gmail did this until recently; they were working on fixing it last I checked. This means that if one of your "few tabs" is gmail and you've had it open for a while a lot of that memory could be actually being used by gmail.
about:memory in Firefox is being improved to make it easier to answer the "what's using the memory" question, at least....