{"id":2476,"date":"2013-02-20T15:42:09","date_gmt":"2013-02-20T04:42:09","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=2476"},"modified":"2013-02-22T08:55:44","modified_gmt":"2013-02-21T21:55:44","slug":"memshrink-progress-week-87-88","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2013\/02\/20\/memshrink-progress-week-87-88\/","title":{"rendered":"MemShrink progress, week 87&#8211;88"},"content":{"rendered":"<h3>SpiderMonkey<\/h3>\n<p>Till Schneidereit <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=679940\">implemented sharing of bytecode and related script data<\/a>.\u00a0 This can result in significant savings, especially if you have multiple tabs open from the same site.\u00a0 For example, with 10 articles open from <a href=\"http:\/\/theage.com.au\">theage.com.au<\/a> I saw an 11.6 MiB saving.\u00a0 This was a MemShrink:P1, and its fix completes half of the &#8220;Better Script Handling&#8221; item from the <a href=\"https:\/\/blog.mozilla.org\/nnethercote\/2012\/07\/11\/memshrink-progress-week-55-56\/\">MemShrink big ticket items list<\/a>.<\/p>\n<p>Terrence Cole <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=837845\">fixed a bad regression that was causing multi-GiB memory spikes when using certain regular expressions<\/a>.\u00a0 He landed this fix on the Nightly, Aurora and Beta channels.<\/p>\n<p>I <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=839973\">reduced<\/a> the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=840809\">overhead<\/a> of small compartments a little.\u00a0 This reduced the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=681201\">size of an unloaded tab<\/a> from 222 KiB to 192 KiB on 64-bit platforms.<\/p>\n<p>Jason Orendorff <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=838813\">removed some source notes<\/a> that are no longer required now that SpiderMonkey&#8217;s decompiler has been removed.\u00a0 This slightly reduces the size of the &#8220;script-data&#8221; entries in about:memory.<\/p>\n<p>I <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=685783\">modified js::Vector so that it doesn&#8217;t waste space when its elements have a size that is not a power of two<\/a>.<\/p>\n<h3>B2G<\/h3>\n<p>Chris Jones <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=841993\">fixed a bad leak in the IPC code<\/a>.\u00a0 This is a big deal because B2G testing has <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=837187\">found<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=841976\">several<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=838869\">cases<\/a> of steadily growing memory consumption that lead to the devices becoming unusable, and there&#8217;s a good chance that this leak was responsible for some of them.\u00a0 More testing is needed to determine exactly how many problems this has fixed.<\/p>\n<p>It&#8217;s not surprising that IPC code is causing B2G problems, because that is code that desktop Firefox uses only lightly (for out-of-process plug-ins), whereas B2G uses it very heavily.\u00a0 There&#8217;s a bug open for <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=842003\">detecting such leaks<\/a> that should be fairly easy to implement, and potentially could lead to big fixes, which is currently looking for an owner.<\/p>\n<h3>Miscellaneous<\/h3>\n<p>Timothy Nikkel <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=784591\">reduced the memory consumed by <code>display:none<\/code> elements<\/a>.\u00a0 This was a tricky bug that was landed and then backed out multiple times due to subtle test failures.\u00a0 And while this bug has benefits of its own, it is most notable for the fact that it was blocking <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=689623\">bug 689623<\/a>, which is the key bug that will help us start to fix Firefox&#8217;s problems with image-heavy pages.\u00a0 (And 689623 itself is close to landing now, with 13 r+&#8217;d patches.)<\/p>\n<p>Matthew Gregan fixed a bug, present only in Firefox 17 ESR, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=834667\">that was causing HTML5 videos to consume multiple GiBs of memory<\/a>.<\/p>\n<p>Alexandre Poirot <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=833783\">fixed another leak in the Add-on SDK<\/a>.<\/p>\n<p>Jonathan Kew <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=837729\">reduced the amount of memory consumed by textruns when Facebook Messenger is enabled<\/a>.<\/p>\n<p>David Keeler <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=839193\">fixed a leak relating to IndexedDatabaseManager<\/a>.<\/p>\n<h3>Bug Counts<\/h3>\n<p>Here are the current bug counts.<\/p>\n<ul>\n<li>P1: 17 (-7\/+8)<\/li>\n<li>P2: 128 (-10\/+19)<\/li>\n<li>P3: 117 (-2\/+15)<\/li>\n<li>Unprioritized: 2 (-22\/+2)<\/li>\n<\/ul>\n<p>Lots of movement there.\u00a0 The -7 P1s is mostly due to a number of bugs being downgraded;\u00a0 these were bugs that seems important previously but now seem less important.\u00a0 (For those who are interested, the bug numbers were: 679942, 763252, 764220, 770612, 819839, 829417, 833518.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SpiderMonkey Till Schneidereit implemented sharing of bytecode and related script data.\u00a0 This can result in significant savings, especially if you have multiple tabs open from the same site.\u00a0 For example, with 10 articles open from theage.com.au I saw an 11.6 MiB saving.\u00a0 This was a MemShrink:P1, and its fix completes half of the &#8220;Better Script [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4261,30,4544,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/2476"}],"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=2476"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/2476\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=2476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=2476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=2476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}