{"id":1506,"date":"2011-11-30T19:44:53","date_gmt":"2011-11-30T08:44:53","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=1506"},"modified":"2011-11-30T19:44:53","modified_gmt":"2011-11-30T08:44:53","slug":"memshrink-progress-report-week-24","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2011\/11\/30\/memshrink-progress-report-week-24\/","title":{"rendered":"MemShrink progress report, week 24"},"content":{"rendered":"<p>Something that happened a while ago but I failed to notice was that Chris Leary <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=634654\">added a regexp cache<\/a> which, among other things, is flushed on every GC.\u00a0 This fixed an existing problem where <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=673189\">cold regexps were not being discarded<\/a>, which was a MemShrink:P1 bug because 10s or even 100s of MBs of compiled regexp code could accumulate in some circumstances.\u00a0 Nice work, Chris!<\/p>\n<p>Andrew McCreight fixed two leaks (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=653248\">here<\/a> and <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=668855\">here<\/a>) involving WeakMaps.\u00a0 WeakMaps are an EcmaScript 5 feature and so are not used that much at the moment, but their popularity will increase over time.<\/p>\n<p>I landed some <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=698968\">memory reporter infrastructure changes<\/a>.\u00a0 These will make it much easier to <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=704400\">integrate DMD<\/a> with Firefox, which will help drive about:memory&#8217;s &#8220;heap-unclassified&#8221; number down.\u00a0 They also do some sanity checking of memory reporters, and this checking has already found some bugs in existing reporters.<\/p>\n<p>Terrence Cole <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=699279\">made the JS engine to a &#8220;shrink&#8221; GC on memory pressure events<\/a>, such as when about:memory&#8217;s &#8220;minimize memory usage&#8221; button is pressed.\u00a0 A &#8220;shrink&#8221; GC is one that causes unused pages to be decommitted.<\/p>\n<p>I wrote two pieces of documentation.<\/p>\n<ul>\n<li>The first is a guide to <a href=\"https:\/\/developer.mozilla.org\/en\/Zombie_Compartments\">zombie compartments<\/a>, including instructions on how to test if an add-on causes them.\u00a0 This guide is similar in spirit to an <a href=\"http:\/\/blog.mozilla.org\/nnethercote\/2011\/07\/20\/zombie-compartments-recognize-and-report-them-stop-the-screaming\/\">old blog post<\/a> of mine, but explains things more carefully.\u00a0 There is a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=704656\">QA test day<\/a> planned for Friday, December 16, and hopefully some extensive add-on leak testing will happen on that day.<\/li>\n<li>The second is a guide to <a href=\"https:\/\/wiki.mozilla.org\/Platform\/Memory_Reporting\">implementing memory reporters<\/a>.\u00a0 Please read it if you ever have to implement one.<\/li>\n<\/ul>\n<p>In publicity news, ZDNet published a <a href=\"http:\/\/www.zdnet.com.au\/googles-lovehate-approach-to-javascript-339326642.htm\">story<\/a> about how Google&#8217;s +1 buttons consume a lot of memory, particular in the newly redesigned Google Reader.\u00a0 The author used Firefox&#8217;s about:memory page to determine this, which enabled him to point the finger at Google&#8217;s JS code instead of Firefox.\u00a0 (Dietrich Ayala <a href=\"http:\/\/autonome.wordpress.com\/2011\/08\/23\/wallflower-un-socializing-your-web\/\">wrote about this topic previously<\/a>, and wrote the <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/wallflower-1\/\">Wallflower<\/a> add-on in response;\u00a0 the Antisocial subscription for AdBlock Plus apparently has the same effect.)<\/p>\n<p>Here&#8217;s the current bug count.<\/p>\n<ul>\n<li>P1: 27 (-5\/+1)<\/li>\n<li>P2: 139 (-4\/+11)<\/li>\n<li>P3: 61 (-0\/+1)<\/li>\n<li>Unprioritized: 0 (-4\/+0)<\/li>\n<\/ul>\n<p>The P1s went down because in today&#8217;s MemShrink meeting we reprioritized several that are now less important than they were.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Something that happened a while ago but I failed to notice was that Chris Leary added a regexp cache which, among other things, is flushed on every GC.\u00a0 This fixed an existing problem where cold regexps were not being discarded, which was a MemShrink:P1 bug because 10s or even 100s of MBs of compiled regexp [&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,4544,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1506"}],"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=1506"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1506\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=1506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=1506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=1506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}