Add-ons
This was the week of add-ons in MemShrink-land.
Jared Wein fixed a problem in Firefox that was causing zombie compartments if you viewed a native video with any add-on installed that implements the nsIContentPolicy interface. Examples of such add-ons are Adblock Plus, GreaseMonkey, and NoScript, which are respectively the #1, #3 and #9 most popular add-ons on AMO! Welcome to the MemShrink club, Jared.
Speaking of GreaseMonkey, Arantius fixed a bug in it that was causing zombie compartments on some GM scripts when opening a background tabs.
I can’t tell who was responsible for the next fix, because the Add-on SDK folks use Github in a way I don’t understand. But Myk Melez and/or Gabor Krizsanits greatly reduced the number of compartments used in JetPack-style add-ons. In one example, the number of compartments dropped from 156 to 8, saving about 20MB of memory. This was a MemShrink:P1 bug.
Also, as far as I can tell, the same patch also fixed bug 680821 which means that all compartments that hold sandboxes created by JetPack-style add-ons will be marked as belonging to that add-on in about:memory.
Jordan Miner reported that the Delicious Bookmarks add-on is leaking excessive numbers of connections to the Places database. I tried to reproduce the problem and failed, but I don’t have a Delicious account. If anyone else who does have a Delicious account is able to reproduce, please let me know or comment in the bug.
Finally, Jorge Villalobos and Andrew Williamson from the add-ons team came to this week’s MemShrink meeting. We had a very fruitful discussion about how to help add-on authors detect and avoid memory leaks, and how to help add-on users understand which add-ons have high memory consumption. Stay tuned for more details in the coming weeks!
Three Cheers for New Contributors
Krzysztof Kotlenga, a new contributor, removed an OpenGL cache that was wasting 1GB+ of memory on Linux when hardware acceleration was enabled (it’s currently not enabled by default, but will be at some point in the future). Great work, Krzysztof! [Update: I originally wrote WebGL instead of OpenGL, which was incorrect.]
Bug Counts
Here are the current bug counts.
- P1: 26 (-2/+0)
- P2: 132 (-14/+3)
- P3: 67 (-2/+5)
- Unprioritized: 4 (-0/+4)
That’s a net reduction of six bugs. The main factor here was that I went through some of our P2s and closed ones that were stale and/or covered by other bugs, and downgraded to P3 a few more that are now known to be less important than we first thought.
Before finishing, I’d like to highlight bug 703427. Richard Hipp, one of the SQLite developers, has a tiny patch that drastically reduces the amount of memory used by SQLite in Firefox — I ran with it for a while and my SQLite memory consumption dropped from ~15MB to less than 3MB. The patch also causes a moderate speed drop, but it’s unclear if that speed drop is noticeable to Firefox. We need someone who understands Firefox’s SQLite usage well to evaluate this patch so that Richard knows if it’s something that should go into a released version of SQLite as an option. The bug is assigned to Marco Bonardo but he’s currently very busy. Is there anyway else who knows enough about SQLite to take on this bug?