Firefox Fixes Big Add-on Memory Leak, Inadvertently Uncovers Another

All extensions created with the Add-on SDK have to be repackaged

By on May 8th, 2012 18:51 GMT

Mozilla is actively working on improving memory usage in Firefox and responsiveness. The two issues are separate, but are sometimes caused by the same things and sometimes affect one another. One of the latest memory usage improvements to land in Firefox, Firefox 15 Nightly to be precise, fixes a lot of memory leaks in add-ons.

The patch is quite impressive as it fixes the "zombie compartments" issue in any add-on that it affected, and there were plenty of those, it was the most common cause of memory leaks in add-ons.

However, the patch introduces another problem that in turn causes other memory leaks. The new problem is much smaller in scale, but it does mean that add-on creators need to repackage their add-ons with the latest version of the Add-on SDK.

This is part good news, part bad news. On the one hand, Mozilla has fixed an issue that has been plaguing all add-ons in a manner that doesn't require any involvement from the add-on makers.

Once Firefox 15 makes its way to the stable channel, users will notice that it uses up a lot less memory after prolonged periods of use even with a lot of add-ons used.

The improvement depends on too many variables to even make a general estimate, but this will save hundreds of megabytes of memory over the course of a day in some cases.

The bad news though is that the patch having fixed the zombie compartments issue has uncovered a deeper problem in the Add-on SDK, which is used to create lightweight, JavaScript and HTML-based extensions for Firefox.

The problem has been fixed in the latest stable release, Add-on SDK 1.6.1, but any extension created with previous versions may be affected.

The solution is simple, developers only have to repackage their extensions with a recent version of the Add-on SDK, and that will still require them to get actively involved, but it isn't much of a hassle.

3 Comments