Memory usage has always been the Achilles' heel of the Firefox browser for part of the user base. Mozilla acknowledges that and is currently working on optimizing the browser's memory usage significantly.
Gregor Wagner analyzed the behavior and noticed that about 30% of the 1 Megabyte chunks could not be deleted because of small files that were still in use in the chunks.
Wagner implemented a patch that separated long and short lived objects by "placing system and user objects into separate chunks". He defines long lived objects as browser elements that do not come from web pages. The core benefit of this approach is that chunks can be emptied a lot quicker which means that they can be returned to the operating system.
An improvement of about 30% was noticed on average on patched versions of the firefox web browser.
Closing all tabs after surfing:
- 108,003,328 B — js-gc-heap (without patch)
- 20,971,520 B — js-gc-heap (with patch)
Memory footprint of the whole browser:
- 310,890,496 B — resident (without patch)
- 219,856,896 B — resident (with patch)
That's an impressive improvement which will likely make its way into the upcoming Firefox 7 browser.
Nicholas Nethercote posted a summary of Firefox memory improvements on his Mozilla based blog which includes information about George Wagner's optmizations, but also information about other parts of the browser that get optimized.
Firefox users can look forward to the next but one version of the browser that ships with all those improvements. In related news, the first Firefox 8 Nightlies have been spotted on the Mozilla server.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.