{"id":1360,"date":"2011-10-26T15:23:04","date_gmt":"2011-10-26T04:23:04","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=1360"},"modified":"2011-10-26T15:23:04","modified_gmt":"2011-10-26T04:23:04","slug":"memshrink-progress-week-19","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2011\/10\/26\/memshrink-progress-week-19\/","title":{"rendered":"MemShrink progress, week 19"},"content":{"rendered":"<h3>Good News<\/h3>\n<p>Peter Van der Beken fixed <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=669096\">a leak caused by chrome code that injects a function into pages<\/a>.\u00a0 This was a MemShrink P1 bug.\u00a0 The commentary in the bug is confusing, but this may have been affecting numerous add-ons including Firebug. (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=669730\">Bug 669730<\/a> is open for tracking leaks in Firebug;\u00a0 it hasn&#8217;t yet been confirmed whether this fix has helped Firebug.)<\/p>\n<p>Andrew McCreight <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=680482\">rewrote JS_DumpHeap so that it dumps the complete JS object graph<\/a>.\u00a0 This was a MemShrink P1 bug because it&#8217;s an important piece of infrastructure for writing leak detection tools.<\/p>\n<p>Justin Lebar <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=693404\">fixed the measurement of RSS on Mac<\/a>.\u00a0 This was a MemShrink P1 bug because it prevented us from <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=694335\">enabling jemalloc on Mac 10.5 machines<\/a>.<\/p>\n<p>Brian Hackett <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=685358\">tweaked the JS engine so that more method JIT code can be discarded periodically<\/a>, particularly chrome code in system compartments.<\/p>\n<p>Oleg Romashin <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=693938\">avoided using transparent layers in Fennec remote offscreen viewports.<\/a>\u00a0 This saves 5MB of memory in the active tab.<\/p>\n<p>I added <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=696690\">a memory reporter for the startup cache<\/a>.\u00a0 This is often around 1MB of memory, but it&#8217;s allocated via mmap\/VirtualAlloc and so doesn&#8217;t change the &#8220;heap-unclassified&#8221; number in about:memory.<\/p>\n<p>Boris Zbarsky fixed <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=696188\">a small leak involving CSS transforms<\/a>.<\/p>\n<h3>Bad News<\/h3>\n<p>It appears a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=696761\">bad memory regression<\/a> has occurred in the past week or so.\u00a0 Several people have reported multi-second pauses caused by garbage collection and cycle collection.\u00a0 The problem only seems to strike when many tabs are open and\/or the browser has been running for multiple days.\u00a0 This needs investigation;\u00a0 if you are experiencing similar problems please report in the bug.\u00a0 Reliable steps to reproduce this bug will be invaluable.\u00a0 If you turn on javascript.options.mem.log in about:config you can see when GCs and CCs occur and how long they take, which is helpful for diagnosis.<\/p>\n<h3>Bug Counts<\/h3>\n<p>The current bug counts are as follows.<\/p>\n<ul>\n<li>P1: 35 (-5, +3)<\/li>\n<li>P2: 113 (-3, +8)<\/li>\n<li>P3: 54 (-0, +1)<\/li>\n<li>Unprioritized: 4 (-5, +3)<\/li>\n<\/ul>\n<p>I want to point out <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=695475\">this bug<\/a>, which presents an idea to help hunt down reproducible leaks that occur when users have multiple add-ons present.\u00a0 This is important because many of the leaks reported by users recently are due to add-ons, but often the reporter has many add-ons installed which makes finding the culprit painful.\u00a0 The goal is to write a Firefox add-on that selectively disables installed add-ons, so that a user can bisect them to discover which add-on is responsible for the leak.\u00a0 This bisecting process is something that people can do manually, but an add-on that automates the process would make things easier and less error-prone.\u00a0 Mercurial&#8217;s &#8216;hg bisect&#8217; command would serve as a useful comparison.\u00a0 Ehsan Akhgari has volunteered to mentor anyone who would like to try to implement this.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Good News Peter Van der Beken fixed a leak caused by chrome code that injects a function into pages.\u00a0 This was a MemShrink P1 bug.\u00a0 The commentary in the bug is confusing, but this may have been affecting numerous add-ons including Firebug. (Bug 669730 is open for tracking leaks in Firebug;\u00a0 it hasn&#8217;t yet been [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[451,30,4555,4544,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1360"}],"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=1360"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1360\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=1360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=1360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=1360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}