{"id":930,"date":"2011-06-22T05:35:04","date_gmt":"2011-06-21T18:35:04","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=930"},"modified":"2011-06-22T05:35:04","modified_gmt":"2011-06-21T18:35:04","slug":"memshrink-progress-week-1","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2011\/06\/22\/memshrink-progress-week-1\/","title":{"rendered":"MemShrink progress, week 1"},"content":{"rendered":"<p>We had our first MemShrink meeting a week ago.\u00a0 Here&#8217;s some progress that&#8217;s been made since then.\u00a0 Please note that this is a list of things that caught my eye, and isn&#8217;t meant to be exhaustive in any way.<\/p>\n<p>Two big improvements were made to garbage collection trigger heuristics.<\/p>\n<ul>\n<li>Gregor Wagner <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=656120\">added a time-based trigger<\/a> to the garbage collector.\u00a0 Most notably, this should prevent slow build-ups of garbage when the browser is left idle but an open website is doing a small amount of continual work (eg. updates on a news site).\u00a0 We&#8217;ve had a lot of reports about this problem, so this will hopefully be a big win. Thanks, Gregor!\u00a0 Note that if the browser is truly idle it won&#8217;t trigger, so it shouldn&#8217;t cause power problems with Firefox mobile.\u00a0 See <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=656120#c29\">this comment<\/a> for full details of the new trigger.<\/li>\n<li>Luke Wagner (no relation to Gregor!) <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=660734\">fixed a gap<\/a> in the garbage collector&#8217;s allocation-based triggers &#8212; certain string allocations weren&#8217;t being counted by the garbage collector, which meant it allowed them to build up excessively.\u00a0 This fix particularly helps with complex regular expression operations.<\/li>\n<\/ul>\n<p>Two improvements were made to the coverage of about:memory, thus reducing the amount of memory falling into the &#8220;heap-unclassified&#8221; bucket.<\/p>\n<ul>\n<li>I added <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=571249\">three new memory reporters<\/a>: explicit\/js\/scripts, explicit\/js\/object-slots, explicit\/js\/string-chars.\u00a0 When I open Gmail, these three together account for 11% of the explicit allocations.<\/li>\n<li>Kyle Huey added <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=664913\">a new memory reporter<\/a> called xpti-working-set, which measures memory used by the XPCOM typelib system.\u00a0 This is usually a bit over 1MB of memory.<\/li>\n<\/ul>\n<p>Justin Lebar made progress on <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=664486\">measuring page fault counts<\/a> and <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=664291\">using them<\/a> to respond when memory pressure is high.<\/p>\n<p>Finally, I made progress on reducing unnecessary compartment overhead, which I described <a href=\"http:\/\/blog.mozilla.org\/nnethercote\/2011\/06\/21\/you-make-what-you-measure\/\">previously<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We had our first MemShrink meeting a week ago.\u00a0 Here&#8217;s some progress that&#8217;s been made since then.\u00a0 Please note that this is a list of things that caught my eye, and isn&#8217;t meant to be exhaustive in any way. Two big improvements were made to garbage collection trigger heuristics. Gregor Wagner added a time-based trigger [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/930"}],"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=930"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/930\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}