Major memory improvements coming to Firefox 15
Firefox 15 stable will be released in about six weeks and it will bring with it major memory improvements that could once and for all do away with the browser's memory hog image. We have shown previously that Firefox's memory utilization has improved significantly in recent versions of the browser (see Chrome uses way more memory than Firefox, Opera or Internet Explorer), and that the browser's image of being memory inefficient is more a thing of the past than it is something that many users complain these days about.
But things are getting even better when Firefox 15 gets released. Users of the beta, aurora or nightly channel are already benefiting from the improvements. Mozilla basically found a way to plug add-on memory leaks in the browser which were often responsible for the memory increase over time.
Firefox now attempts to clean up after leaky chrome code.Â My approach takes advantage of the fact that chrome code lives in a separate compartment from web page code.Â This means that every reference from chrome code to content code goes through a cross-compartment wrapper, which we maintain in a list.Â When the page is navigated, or a tab is closed, we reach into chrome compartment and grab this list.Â We go through this list and â€œcutâ€ all of the wrappers that point to objects in the page weâ€™re getting rid of.Â The garbage collector can then reclaim the memory used by the page that is now gone.
Memory leaks have been found in all kind of add-ons, including the four most popular add-ons for the browser: Adblock Plus, Video DownloadHelper, Greasemonkey and Firebug.
Take a look at the following chart that shows the difference quite clearly. The blue bar shows the browser's memory usage with 151 tabs open, the red bar the same browser's memory utilization once 150 tabs have been closed again.
In this case, the memory leaking add-on sideAdvisor 3.41 was causing the browser to use way more memory after closing the tabs than it should have been using. With Firefox 15, the usage dropped significantly despite the memory leaking add-on.
Not every Firefox user may see those improvements. If you do not use a single add-on for instance, you won't see improvements at all. But who in their right mind uses Firefox without add-ons? Read more about the changes at Nicholas Nethercoate's Mozilla blog.
Are you working with Firefox? If so, what is your take on recent developments in regards to performance?Advertisement