{"id":1536,"date":"2012-01-04T15:58:37","date_gmt":"2012-01-04T04:58:37","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=1536"},"modified":"2012-01-04T20:45:14","modified_gmt":"2012-01-04T09:45:14","slug":"memshrink-progress-weeks-28-29","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2012\/01\/04\/memshrink-progress-weeks-28-29\/","title":{"rendered":"MemShrink progress, weeks 28&#8211;29"},"content":{"rendered":"<p>It&#8217;s been a quiet couple of weeks, due to Christmas, New Year, and all that.<\/p>\n<p>Two leaks in add-ons were fixed.<\/p>\n<ul>\n<li>cyberscorpio <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=714509\">fixed a zombie compartment<\/a> in the <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/super-start\/\">Super Start<\/a> add-on.\u00a0 The problem was that the add-on was failing to remove an event observer when a page is unloaded.\u00a0 The fix will be present in v3.6.2.<\/li>\n<li>Jesse Hakanen <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=711778\">fixed a zombie compartment <\/a>in the <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/adblock-plus-pop-up-addon\/\">AdBlock Plus Pop-up Addon<\/a> add-on (note that this is add-on extends the blocking functionality of AdBlock Plus, it&#8217;s not AdBlock Plus itself).\u00a0 The problem was that the add-on was failing to catch the page unload event, and so some references to closed pages were left in memory.\u00a0 The fix is now available in v0.3.<\/li>\n<\/ul>\n<p>Because both leaks had similar causes, I updated the <a href=\"https:\/\/developer.mozilla.org\/en\/Zombie_compartments#Avoiding_zombie_compartments_in_add-ons\">documentation on avoiding zombie compartments in add-ons<\/a> accordingly.<\/p>\n<p>Patches for two other MemShrink bugs landed.<\/p>\n<ul>\n<li>Stefan Wilberg fixed <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=712614\">a regression that was causing about:addons to not be freed after closing it<\/a>.<\/li>\n<li>I added <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=712835\">a memory reporter for nsAtomTable<\/a>.\u00a0 It&#8217;s usually 1MB or more.<\/li>\n<\/ul>\n<p>I saw two noteworthy mentions of Firefox&#8217;s recent reductions in memory consumption. The first was in <a href=\"http:\/\/www.webmonkey.com\/2011\/12\/mozilla-unleashes-faster-smaller-firefox-9\/\">webmonkey.com&#8217;s review of Firefox 9<\/a>.<\/p>\n<blockquote><p>Alongside the faster JavaScript processing Firefox 9 continues to show improvements from Mozilla\u2019s <a href=\"https:\/\/wiki.mozilla.org\/Performance\/MemShrink\">MemShrink project<\/a>, an ongoing effort to reduce memory usage in the browser. Indeed, for the first time in a very long time my testing showed Firefox 9 using less memory than Opera (which has long been the least RAM-hungry browser I test). Opening the same dozen tabs in both Firefox and Opera used only 367MB of RAM in Firefox compared to 378MB in <a href=\"http:\/\/www.webmonkey.com\/2011\/12\/new-opera-11-60-is-faster-uses-less-memory\/\">Opera 11.60<\/a> [<strong>Update<\/strong>: Note that the memory test was performed with the following Firefox add-ons running: AdBlock, Ghostery, BetterPrivacy and HTTPS-Everywhere.] There\u2019s no longer much difference between the two, which is a testament to Firefox\u2019s dramatic improvement over the last six months of MemShrink efforts.<\/p><\/blockquote>\n<p>Cross-browser memory comparisons are fraught with difficulties, both in the measuring and the interpreting, so I don&#8217;t give the comparison with Opera much weight.\u00a0 But the fact that this author has seen Firefox&#8217;s own memory consumption drop over the last few versions <em>is<\/em> meaningful.<\/p>\n<p>The second was a <a href=\"http:\/\/blog.mozilla.org\/nnethercote\/2011\/12\/21\/memshrink-progress-week-27\/comment-page-1\/#comment-4701\">comment on the previous MemShrink progress report from AC<\/a> about Firefox 10.<\/p>\n<blockquote><p>You may remember that I posted a few weeks ago saying that Firefox 9 beta was great and that I could definitely see more memory and performance improvements over Fire 7 and 8. Well I am pleased to say that after a few days of using Firefox 10 beta 1, I can clearly see more memory improvements again. There is an obvious difference between Firefox 9 and Firefox 10 on the beta channel.<\/p>\n<p>I have no hard evidence as such other than saying that nothing has changed on my laptop in the last few weeks but I am using the same heavy tab load and the memory usage displayed by Windows task manager is lower than it was by about 20 MB and the responsiveness and speed feels sharp.<\/p>\n<p>Whatever you guys are doing with the Memshrink project, keep doing it because the results are paying dividends.<\/p><\/blockquote>\n<p>I&#8217;ve read literally 1000s of complaints about Firefox&#8217;s memory consumption online, so it&#8217;s very encouraging to hear compliments.<\/p>\n<p>Here are the current bug counts.<\/p>\n<ul>\n<li>P1: 28 (-0\/+2)<\/li>\n<li>P2: 143 (-1\/+5)<\/li>\n<li>P3: 64 (-1\/+1)<\/li>\n<li>Unprioritized: 0 (-0\/+0)<\/li>\n<\/ul>\n<p>No big changes, unsurprisingly.\u00a0 [Update: the P2 numbers were incorrect and have been fixed.]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been a quiet couple of weeks, due to Christmas, New Year, and all that. Two leaks in add-ons were fixed. cyberscorpio fixed a zombie compartment in the Super Start add-on.\u00a0 The problem was that the add-on was failing to remove an event observer when a page is unloaded.\u00a0 The fix will be present in [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[119,30,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1536"}],"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=1536"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1536\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=1536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=1536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=1536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}