Firefox 3: how to rock on a memory budget
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.
In brief:
- 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.”



Subscribe RSS
Subscribe email
March 12th, 2008 at 4:22 pm
I’m definitely enjoying this. Firefox 3 is a bit heavier than Firefox 2 when we start browsing, but while Firefox 2 would increase its memory usage over time, Fx3 won’t and will instead stay at reasonable levels. Also, it handles 60+ extensions a lot better than Fx2 did, which is simply awesome for guys like me that use 60+ extensions :P
[Reply]
March 12th, 2008 at 9:45 pm
IE 5 even makes this crap look like ….. crap!
[Reply]
March 12th, 2008 at 11:24 pm
I’m thoroughly enjoying this browser war. You won’t catch me using any browser other than Firefox, but it’s great to see the competition struggle.
[Reply]
March 13th, 2008 at 9:27 am
I would like to see the specs for Safari. The other day I browsed their site, and they claimed that they were pretty much better at everything. KTHML or WebKit should be pretty efficient, as far as I have heard.
K-Meleon is actually nice. You may catch me using it. I also enjoy Lynx or W3M at times.
-Rasmus
[Reply]
March 13th, 2008 at 9:44 pm
Where are the results for:
Internet Explorer 8 (IE8)
Opera 9.26
Opera 9.50 Beta
Safari 3
Although the new improvement are nice, it would be better to see a super lightweight Firefox Lite Editon. This would be a step toward Firefox Mobile Edition.
Internet Explorer Mobile - Yes
Opera Mobile - Yes
Safari Mobile - Yes
Firefox Mobile - No
[Reply]
March 16th, 2008 at 11:12 am
For me, with no add-ons, the browser starts up in less than 1 second (512MB Ram intel p4 2,8 ghz 80GB hd). Very cool! Compared to ff2, which is 4 s, it is a 4 time run!
[Reply]
March 20th, 2008 at 1:31 am
> Opera 9.5beta … releases down to 220 MB
The comment says that
> doesn’t free up any memory at the end (so ends at 240MB).
And here is the updated graph with Opera 9.5 and Safari.
memory-graph2 on Flickr - Photo Sharing!
http://www.flickr.com/photos/stuartp/2328802961/
[Reply]