For those who have already noticed Firefox 3’s memory usage improvements and wonder how they did it while adding a wealth of new features, Mozilla’s Stuart Parmenter has posted an excellent write up about what has been done so far to improve Firefox 3 memory management.
– Defragmentation, which has reduced memory usage after startup in more than one third.
– Image cache, fonts cache, back/forward cache, and more. They have all been tuned up to free used resources after certain time of inactivity.
– Uncompressed images are discarded from memory after a while if not active.
– More efficient animated GIFs storage in memory.
– About 400 memory leaks have been hunted and taken down thanks in part to better tools to identify them.
– A cycle collector takes care of objects referencing each other preventing either of them being cleared from memory.
Stuart ran a set of tests on Firefox 3, along with Firefox 2 and Internet Explorer 7 to see memory usage when opening a total of 319 pages simulating new windows. Pages were loaded from a proxy to prevent network conditions affect the test.
The graph below (courtesy of Stuart) shows how Firefox 3 in general uses less memory than in the past (Firefox 2). Better yet, it effectively returns the memory it doesn’t need anymore after a few minutes. My previous, not as comprehensive and less automated test revealed a similar behavior.
By popular demand, Mike Shroepfer put Opera 9.5beta under the same test, and found it peaks at 240MB (compared to FF3’s 220MB) and releases down to 220 MB (pretty much higher than FF3’s 85 MB).
The bottom line: Firefox 3 rocks in memory management.
Now, get the popcorn and let’s all wait for the next round of numbers from a competitor.
Yes, it’s definitely Browser Wars II. Enjoy.
And one more thing, as noted by Chris Blizzard: “So what does this mean in a mobile context? Itâ€™s pretty simple, really. What it shows to anyone who looks is that weâ€™re able to hit the kinds of memory and performance requirements that mobile platforms demand.”