Firefox fixes 14 year old bug


bugBig cheeses in the Mozzarella Foundation have finally gotten around to fixing an ancient bug with its Firefox browser which will be great for Adblock Plus users.

Mozilla developer Cameron McCormack recently fixed bug 77999, enabling sharing of CSS-related data. Data structures that share the results of cascading user agent style sheets are now a go, which allowed the second issue (bug 988266) to be fixed as well.

Adblock Plus was registering a single style sheet for its element-hiding feature, but Firefox was creating a new copy of it for each page being loaded. This meant that the memory consumption could skyrocket (up to 2GB in one edge case) as more copies were created.

Mozilla developer Nicholas Nethercote said that the update meant that in one extreme example memory usage dropped by 3.62 MiB per document. Since there were examples of 429 documents on a single page it meant that the user was saving 1,550 MiB.

With Cameron’s patches applied Firefox with AdBlock Plus used about 90 MiB less physical memory, which is a reduction of over 10 per cent. Even when AdBlock Plus is not enabled this change has a moderate benefit.

This improvements have been trickling down since July’s Nightly build, first to Firefox Developer Edition, then to Firefox Beta, and now to the latest stable version. This means that Firefox now uses “about the same amount of memory” whether you’re running the most popular add-on or not.

Many Firefox users will gladly use more memory to block ads, but now they don’t have to use nearly anywhere as much.

Quite why it took Mozilla so long to fix the problem is anyone’s guess.  Firefox is famous for hanging on to your memory and never giving it back and gave Google’s Chrome a foothold into the market.