{"id":1794,"date":"2012-02-29T15:27:51","date_gmt":"2012-02-29T04:27:51","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=1794"},"modified":"2012-02-29T16:11:50","modified_gmt":"2012-02-29T05:11:50","slug":"memshrink-progress-week-37","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2012\/02\/29\/memshrink-progress-week-37\/","title":{"rendered":"MemShrink progress, week 37"},"content":{"rendered":"<p>It&#8217;s been a huge week for MemShrink.<\/p>\n<h3>Add-ons<\/h3>\n<p>I filed <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=730737\">a bug on testing the top 100 add-ons for memory leaks<\/a>.\u00a0 The majority of these add-ons are not available on AMO and so are not subject to the leak checking done during AMO reviews.\u00a0 The instructions and current test results are <a href=\"https:\/\/etherpad.mozilla.org\/hSOVNzKZen\">here<\/a>.\u00a0 Randell Jesup helped identify some some add-ons with unclear identities, and Nils Maier and Archaeopteryx have both tested several add-ons.\u00a0 A month ago I said that <a href=\"http:\/\/blog.mozilla.org\/nnethercote\/2012\/01\/25\/memshrink-progress-week-32\/\">add-ons that leak are the #1 problem for MemShrink<\/a>, and this bug represents a huge step towards reducing that problem.\u00a0 We&#8217;ll need lots of additional help to test this many add-ons, so please feel free to jump in!<\/p>\n<p>As far as I know, comprehensive testing of the most popular add-ons has never been done before.\u00a0 Although this testing is aimed at finding memory leaks, it&#8217;s quite possible it will uncover various other problems with add-ons.\u00a0 Indeed, it&#8217;s clear just from looking at the list that quite a few of the non-AMO add-ons are of dubious merit, and this has stimulated some <a href=\"https:\/\/groups.google.com\/forum\/?fromgroups#!topic\/mozilla.dev.platform\/UY1XnWBKiCU\">interesting discussion on dev-platform<\/a> about third-party add-ons, i.e. those that are installed into Firefox by an external program.<\/p>\n<p>The following add-ons had leaks fixed or mostly fixed by their authors: <a href=\"http:\/\/blog.mozilla.org\/addons\/2012\/02\/27\/mcafee-add-on-update\/\">McAfee Site Advisor<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=718375\">Ghostery<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=728525\">Spool,<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=715474\">Screengrab (fix version)<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=698018\">Roboform<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=728008\">UF Comment Board Tools<\/a>,\u00a0 <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=727413\">Geenstijl,<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=712733\">Long URL Please<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=729948\">HTML Desktop Notifications<\/a>.<\/p>\n<p>Nils Maier <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=725194\">greatly improved<\/a> the <a href=\"https:\/\/developer.mozilla.org\/en\/Extensions\/Common_causes_of_zombie_compartments_in_extensions\">documentation on common causes of memory leaks in add-ons<\/a>.\u00a0 This was a MemShrink:P1 bug.\u00a0 That doesn&#8217;t mean the document can&#8217;t be improved further, however;\u00a0 it&#8217;s a wiki so please continue to add to it if you can.<\/p>\n<h3>Regression testing<\/h3>\n<p>John Schoenick&#8217;s excellent <a href=\"http:\/\/areweslimyet.com\/\">areweslimyet.com<\/a> is getting close to being ready for a public unveiling.\u00a0 The site is currently live but password-protected, simply to prevent large numbers of people accessing it before it&#8217;s ready.\u00a0 (If you want a sneak peek, contact me for the password.)\u00a0 More importantly, it <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=731437\">identified a large regression in memory consumption<\/a> caused by the landing of the JS engine&#8217;s <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=641025\">incremental garbage collector<\/a> on February 19, which Bill McCloskey is investigating.<\/p>\n<p>Tim Taubert <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=683953\">improved Firefox&#8217;s regression testing to ensure that no new DocShell and DOMWindow leaks are introduced<\/a>.\u00a0 This was a MemShrink:P1 bug because these leaks are quite easy to introduce.\u00a0 Tim wrote some more about this change <a href=\"http:\/\/timtaubert.de\/2012\/02\/fighting-docshell-and-domwindow-leaks\/\">here<\/a>.<\/p>\n<h3>Cycle collector<\/h3>\n<p>Jan Honza Odvarko&#8217;s <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/cycle-collector-analyzer\/\">about:ccdump add-on made it onto AMO this week<\/a>.\u00a0 Jan has been <a href=\"http:\/\/www.softwareishard.com\/blog\/planet-mozilla\/hunting-zombie-memory-leaks-in-firefox\/\">using this to hunt down some tricky leaks in Firebug<\/a>.<\/p>\n<p>Marco Bonardo <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=721319\">fixed a leak in PlacesUtils.removeLazyBookmarkObserver()<\/a> that I won&#8217;t pretend to understand, but which was a MemShrink:P1.\u00a0 Marco also<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=728230\"> fixed a leak that occurred after bookmarking a page, closing the window, and opening a new window<\/a>.<\/p>\n<p>Olli Pettay fixed an equally impenetrable (to me) <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=726334\">leak involving nsFormFillController::mFocusedInput<\/a>.<\/p>\n<p>Kyle Huey <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=728392\">fixed a leak in the About Firefox dialog<\/a>.<\/p>\n<p>Andrew McCreight <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=697115\">added additional information to cycle collector&#8217;s error console logging<\/a>, which helps with identifying and debugging cycle collector problems.<\/p>\n<h3>Miscellaneous<\/h3>\n<p>Jason Duell <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=696085\">fixed an obscure leak involve web sockets<\/a>.<\/p>\n<p>Bill McCloskey <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=718053\">fixed a minor JS engine leak<\/a>.<\/p>\n<p>I <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=729403\">added a new memory reporter called &#8220;js\/runtime\/gc-marker&#8221;<\/a>.\u00a0 It starts out at 256KB and I saw it reach 2.8MB when running <a href=\"http:\/\/gregor-wagner.com\/tmp\/mem\">MemBench<\/a>.\u00a0 I also <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=711901\">converted the existing source image reporters to the new style<\/a>, which seems to haved fixed <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=723088\">some bogus results in about:memory<\/a> as a side-effect.<\/p>\n<h3>Quote of the week<\/h3>\n<p>Adam Overa of Tom&#8217;s Hardware did another <a href=\"http:\/\/techcrunch.com\/2012\/02\/22\/browser-shootout-shows-minor-variations-in-performance-its-still-a-matter-of-taste\/\">browser Grand Prix<\/a>.\u00a0 Devin Coldewey used the results from the Grand Prix to conclude that <a href=\"http:\/\/techcrunch.com\/2012\/02\/22\/browser-shootout-shows-minor-variations-in-performance-its-still-a-matter-of-taste\/\">Firefox and Chrome are both great, and which you prefer basically comes down to a matter of taste<\/a>.\u00a0 While that is an interesting conclusion, what caught my eye was <a href=\"http:\/\/techcrunch.com\/2012\/02\/22\/browser-shootout-shows-minor-variations-in-performance-its-still-a-matter-of-taste\/?fb_comment_id=fbc_10151329579990637_30695840_10151330382790637#f715ee3c23fae8\">this comment<\/a>, by Balaji Viswanathan:<\/p>\n<blockquote><p>I guess the title could have been &#8220;All browsers suck equally bad now&#8221;. Firefox and Chrome have grown to become more resources hogs &#8211; closer to IE. These days I shudder to fire up the firefox as the memory leaks are terrible. Two hours of Firefox with a Facebook tab is enough to gobble up 25% of my memory. With Chrome, I would have 20 rendering processes showing up when I would have just 3 tabs open.<\/p>\n<p>In the first 2 years of Chrome I had probably 2 or 3 crashes. These days, it crashes every week or so. <strong>I long for the 2006 era Firefox &#8211; clean, simple and lean.<\/strong> Its been a long time since I have used IE actively and with Safari lesser said the better. For the developers, we have to deal with the ultra slow update cycles of IE and ultraspeed update cycles of Chrome. In short, we are getting worse and worse in the browser arena. The market is ripe for a breakthrough.<\/p><\/blockquote>\n<p>&#8220;2006 era Firefox&#8221; would have been Firefox 1.5 or Firefox 2.\u00a0 Balaji may think he&#8217;s nostalgic for browsers of that era, but really he&#8217;s nostalgic for the <em>web<\/em> of that era, which was massively simpler than the web of today.\u00a0 If Balaji tried Firefox 1.5 or Firefox 2 today &#8212; with no HTML5 support, no JavaScript JIT and no hardware acceleration &#8212; today, I&#8217;m sure he&#8217;d quickly decide that 2012-era browsers aren&#8217;t so bad after all.\u00a0 I guess the interesting question is this: why do people blame browsers instead of websites for high resource consumption?<\/p>\n<h3>Bug counts<\/h3>\n<p>This week\u2019s bug counts:<\/p>\n<ul>\n<li>P1: 28 (-5\/+5)<\/li>\n<li>P2: 129 (-12\/+7)<\/li>\n<li>P3: 83 (-8\/+12)<\/li>\n<li>Unprioritized: 2 (-2\/+2)<\/li>\n<\/ul>\n<p>That&#8217;s a net reduction of one bug.\u00a0 But more importantly, there is lots of movement, which is great!\u00a0 It means that problems are being identified and fixed.<\/p>\n<p>(Finally, commenters please note that I&#8217;ve turned on the WP-reCAPTCHA plug-in, and this the first post I&#8217;ve written since doing so.\u00a0 In my testing it&#8217;s worked fairly well.\u00a0 Hopefully it won&#8217;t cause problems.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been a huge week for MemShrink. Add-ons I filed a bug on testing the top 100 add-ons for memory leaks.\u00a0 The majority of these add-ons are not available on AMO and so are not subject to the leak checking done during AMO reviews.\u00a0 The instructions and current test results are here.\u00a0 Randell Jesup helped [&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,119,30,4555,4544,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1794"}],"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=1794"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1794\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=1794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=1794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=1794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}