{"id":2373,"date":"2012-11-28T15:29:26","date_gmt":"2012-11-28T04:29:26","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=2373"},"modified":"2012-11-28T15:29:26","modified_gmt":"2012-11-28T04:29:26","slug":"memshrink-progress-week-75-76","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2012\/11\/28\/memshrink-progress-week-75-76\/","title":{"rendered":"MemShrink progress, week 75&#8211;76"},"content":{"rendered":"<p>B2G continues to be a major focus of work relating to memory consumption.\u00a0 Even the non-B2G-specific improvements made this fortnight were mostly identified and made to help B2G.<\/p>\n<h3>B2G-specific<\/h3>\n<p>Gabriele Svelto <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=805855\">caused dirty freed pages held onto by jemalloc to be purged when a B2G process experiences memory pressure<\/a>, such as when it goes into the background.\u00a0 This typically reduces a process&#8217; size by about 2 MiB, so it&#8217;s a big deal.\u00a0 This was a MemShrink P1 bug.<\/p>\n<p>Benoit Jacob <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=813783\">prevented the creation of redundant OpenGL contexts on B2G<\/a>.\u00a0 This saves 750 KiB in the main B2G process, and 750 KiB in every child that uses WebGL.\u00a0 Benoit was able to do this based on data from a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=801580\">B2G-specific heap profiler<\/a> written by Justin Lebar.<\/p>\n<p>I <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=811596\">made a large IPC message buffer shrink once all messages from it have been processed<\/a>.\u00a0 This saves either 120 KiB or 248 KiB per child process.<\/p>\n<p>James Lal <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=805366\">greatly reduced memory consumption of the ical parser during sync<\/a>.\u00a0 This change also made it much faster.<\/p>\n<p>Justin Lebar and I <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=812957\">added a memory reporter for Freetype<\/a>, which uses about 2 MiB of memory in the main B2G process.\u00a0 (This reporter also works on Fennec.)<\/p>\n<p>Andrea Marchesini <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=808266\">added a memory reporter for B2G&#8217;s gralloc memory<\/a>.<\/p>\n<h3>Miscellaneous<\/h3>\n<p>Bill McCloskey <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=811176\">made the JavaScript engine clean up more data on memory pressure events<\/a>.<\/p>\n<p>I <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=811132\">increased the size of the chunks used by XPT info&#8217;s arena allocator<\/a>, which saves about 80 KiB per process on 32-bit, and a bit more on 64-bit.<\/p>\n<p>Randell Jesup <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=812641\">fixed a PeerConnection leak in WebRTC code<\/a>.<\/p>\n<p>I <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=789398\">added more detail to the JavaScript type inference memory reporters<\/a>.<\/p>\n<h3>Bug counts<\/h3>\n<p>Here are the current bug counts.<\/p>\n<ul>\n<li>P1: 17 (-4\/+1)<\/li>\n<li>P2: 114 (-5\/+9)<\/li>\n<li>P3: 103 (-4\/+5)<\/li>\n<li>Unprioritized: 2 (-3\/+1)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>B2G continues to be a major focus of work relating to memory consumption.\u00a0 Even the non-B2G-specific improvements made this fortnight were mostly identified and made to help B2G. B2G-specific Gabriele Svelto caused dirty freed pages held onto by jemalloc to be purged when a B2G process experiences memory pressure, such as when it goes into [&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\/2373"}],"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=2373"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/2373\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=2373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=2373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=2373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}