{"id":2308,"date":"2012-09-19T17:10:12","date_gmt":"2012-09-19T06:10:12","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=2308"},"modified":"2012-09-19T17:12:31","modified_gmt":"2012-09-19T06:12:31","slug":"memshrink-progress-week-65-66","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2012\/09\/19\/memshrink-progress-week-65-66\/","title":{"rendered":"MemShrink progress, week 65&#8211;66"},"content":{"rendered":"<h3>Gecko<\/h3>\n<p>Tim Taubert <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=776928\">set the style of a not-yet-restored tab&#8217;s &lt;browser&gt; element to display:none<\/a>, eliminating the need for any layout data to be stored in memory for such a tab.\u00a0 This was a MemShrink:P1 bug and is a nice improvement for users who typically have many (e.g. 100+) tabs open, because it saves 0.17MB per not-yet-restored tab on 64-bit platforms, and slightly less on 32-bit platforms.<\/p>\n<p>Bobby Holley <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=789773\">fixed a defect<\/a> that was causing some add-ons (NoScript, Roboform, and Google PageSpeed) to create ghost windows. \u00a0 This fix has been also been ported to the Aurora and Beta channels and so will be present in Firefox 16.<\/p>\n<h3>Add-on SDK<\/h3>\n<p>Version 1.10 of the Add-on SDK was released.\u00a0 It has <a href=\"https:\/\/blog.mozilla.org\/addons\/2012\/09\/18\/announcing-add-on-sdk-1-10\/\">two fixes that prevent various leaks<\/a>.\u00a0 Furthermore, Alexandre Poirot fixed <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=764831\">two<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=764840\">other<\/a> leaks in the Add-on SDK;\u00a0 these changes will presumably make it into version 1.11.<\/p>\n<p>The Add-on SDK has had a lot of leaks fixed over the past few months.\u00a0 Hopefully we&#8217;re getting near the end of them!<\/p>\n<h3>Generational GC<\/h3>\n<p>I have started helping with the ongoing project to convert the JavaScript engine&#8217;s mark-and-sweep garbage collector to a compacting, generational collector.\u00a0 This is the #2 item on the <a href=\"https:\/\/blog.mozilla.org\/nnethercote\/2012\/07\/11\/memshrink-progress-week-55-56\/\">current MemShrink &#8220;Big Ticket Items&#8221; list<\/a> because it should significantly reduce JS memory consumption, and it should also help performance in other ways.<\/p>\n<p>It&#8217;s a big task because it makes a very fundamental change to the JS engine: garbage-collected things such as JS objects, strings and functions can <em>move<\/em>.\u00a0 This is a big deal because these things are represented within the JS engine as C++ objects of various kinds, and it&#8217;s not normal for C++ objects to move!\u00a0 Think about it &#8212; if you have a pointer to a C++ object, and the object moves, the pointer is no longer valid.<\/p>\n<p>I won&#8217;t go into detail about how we handle this but the important thing to know is that pretty much every place in the JS engine where we have a raw C++ pointer to a GC thing object needs to be manually changed to use a new representation.\u00a0 This is literally tens of thousands of changes that must be completed before the garbage collector can be made either compacting or generational (the two properties are orthogonal, with both providing benefits).<\/p>\n<p>If you are interested in following the progress of this conversion, take a look at <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=753203\">bug 753203<\/a>.<\/p>\n<h3>A reminder<\/h3>\n<p>In these MemShrink reports I usually write about Firefox changes just after they first land on mozilla-central.\u00a0 Such changes will show up in Nightly builds within a day, but won&#8217;t reach an official Firefox release for 12&#8211;18 weeks, as per Firefox&#8217;s <a href=\"https:\/\/wiki.mozilla.org\/RapidRelease\/Calendar\">release schedule<\/a>.\u00a0 If you remember that you&#8217;ll avoid any <a href=\"https:\/\/blog.mozilla.org\/nnethercote\/2012\/08\/29\/debunking-a-misconception-about-firefox-releases\/\">confusion<\/a> about which changes are in which release.<\/p>\n<p>For example:\u00a0 except where noted otherwise, the changes I&#8217;ve mentioned above will be in Firefox 18 &#8212; assuming they don&#8217;t cause problems that cause them to be backed out &#8212; which is due for final release in early January, 2013. (The current scheduled release date is January 1st, but that will probably be delayed slightly because New Year&#8217;s Day is not a good day for a release!)<\/p>\n<h3>Bug Counts<\/h3>\n<p>Here are the current bug counts.<\/p>\n<ul>\n<li>P1: 21 (-1\/+0)<\/li>\n<li>P2: 89 (-5\/+4)<\/li>\n<li>P3: 100 (-3\/+7)<\/li>\n<li>Unprioritized: 3 (-2\/+3)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Gecko Tim Taubert set the style of a not-yet-restored tab&#8217;s &lt;browser&gt; element to display:none, eliminating the need for any layout data to be stored in memory for such a tab.\u00a0 This was a MemShrink:P1 bug and is a nice improvement for users who typically have many (e.g. 100+) tabs open, because it saves 0.17MB per [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,4555,4544,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/2308"}],"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=2308"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/2308\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=2308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=2308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=2308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}