{"id":1568,"date":"2012-01-11T16:46:05","date_gmt":"2012-01-11T05:46:05","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=1568"},"modified":"2012-01-12T08:58:57","modified_gmt":"2012-01-11T21:58:57","slug":"memshrink-progress-week-30","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2012\/01\/11\/memshrink-progress-week-30\/","title":{"rendered":"MemShrink progress, week 30"},"content":{"rendered":"<h3>Add-ons<\/h3>\n<p>This was the week of add-ons in MemShrink-land.<\/p>\n<p>Jared Wein fixed <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=711675\">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<\/a>.\u00a0 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!\u00a0 Welcome to the MemShrink club, Jared.<\/p>\n<p>Speaking of GreaseMonkey, Arantius fixed a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=707403\">bug in it that was causing zombie compartments on some GM scripts when opening a background tabs<\/a>.<\/p>\n<p>I can&#8217;t tell who was responsible for the next fix, because the Add-on SDK folks use Github in a way I don&#8217;t understand.\u00a0\u00a0 But Myk Melez and\/or Gabor Krizsanits <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=672443\">greatly reduced the number of compartments used in JetPack-style add-ons<\/a>.\u00a0 In one example, the number of compartments dropped from 156 to 8, saving about 20MB of memory.\u00a0 This was a MemShrink:P1 bug.<\/p>\n<p>Also, as far as I can tell, the same patch also fixed <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=680821\">bug 680821<\/a> 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.<\/p>\n<p>Jordan Miner reported that the <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/delicious-bookmarks\/\">Delicious Bookmarks<\/a> add-on is <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=716163\">leaking excessive numbers of connections to the Places database<\/a>.\u00a0 I tried to reproduce the problem and failed, but I don&#8217;t have a Delicious account.\u00a0 If anyone else who does have a Delicious account is able to reproduce, please let me know or comment in the bug.<\/p>\n<p>Finally, Jorge Villalobos and Andrew Williamson from the add-ons team came to this week&#8217;s MemShrink meeting.\u00a0 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.\u00a0 Stay tuned for more details in the coming weeks!<\/p>\n<h3>Three Cheers for New Contributors<\/h3>\n<p>Krzysztof Kotlenga, a new contributor, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=678940\">removed an OpenGL cache that was wasting 1GB+ of memory on Linux when hardware acceleration was enabled<\/a> (it&#8217;s currently not enabled by default, but will be at some point in the future).\u00a0\u00a0 Great work, Krzysztof!\u00a0 [Update: I originally wrote WebGL instead of OpenGL, which was incorrect.]<\/p>\n<h3>Bug Counts<\/h3>\n<p>Here are the current bug counts.<\/p>\n<ul>\n<li>P1: 26 (-2\/+0)<\/li>\n<li>P2: 132 (-14\/+3)<\/li>\n<li>P3: 67 (-2\/+5)<\/li>\n<li>Unprioritized: 4 (-0\/+4)<\/li>\n<\/ul>\n<p>That&#8217;s a net reduction of six bugs.\u00a0 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.<\/p>\n<p>Before finishing, I&#8217;d like to highlight <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=703427\">bug 703427<\/a>.\u00a0 Richard Hipp, one of the SQLite developers, has a tiny patch that drastically reduces the amount of memory used by SQLite in Firefox &#8212; I ran with it for a while and my SQLite memory consumption dropped from ~15MB to less than 3MB.\u00a0 The patch also causes a moderate speed drop, but it&#8217;s unclear if that speed drop is noticeable to Firefox.\u00a0 We need someone who understands Firefox&#8217;s SQLite usage well to evaluate this patch so that Richard knows if it&#8217;s something that should go into a released version of SQLite as an option.\u00a0 The bug is assigned to Marco Bonardo but he&#8217;s currently very busy.\u00a0 Is there anyway else who knows enough about SQLite to take on this bug?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.\u00a0 Examples of such add-ons are Adblock Plus, GreaseMonkey, and NoScript, which are respectively the #1, #3 and #9 most [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4550,4559,119,4554,30,4544,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1568"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/users\/139"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/comments?post=1568"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1568\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=1568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=1568"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=1568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}