Bug 1335148 - Part 4: Remove unused max_decoded_image_kb pref. r=snorp
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 30 Mar 2018 18:54:48 +0200
changeset 417627 e5332f31998b9d3cf40114fb21c13c49bb75a9db
parent 417626 36e95b6ba7a6fcebf06030e449ad2cf4b73ae9a2
child 417628 c576126a7c7e75bd94de623ed1c6aa40c0bd9b4f
push id33974
push userncsoregi@mozilla.com
push dateThu, 10 May 2018 09:47:43 +0000
treeherdermozilla-central@b52b2eb81d1e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1335148, 1104622
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1335148 - Part 4: Remove unused max_decoded_image_kb pref. r=snorp Since bug 1104622, that pref has in fact been unused, so us setting that value to 0 on memory pressure didn't really achieve anything. Instead, the SurfaceCache already does its own memory management and discards image surfaces when receiving a memory-pressure notification. MozReview-Commit-ID: 4aqvclgvLhX
browser/app/profile/firefox.js
mobile/android/chrome/content/MemoryObserver.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1301,21 +1301,16 @@ pref("pdfjs.disabled", false);
 // Used by pdf.js to know the first time firefox is run with it installed so it
 // can become the default pdf viewer.
 pref("pdfjs.firstRun", true);
 // The values of preferredAction and alwaysAskBeforeHandling before pdf.js
 // became the default.
 pref("pdfjs.previousHandler.preferredAction", 0);
 pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false);
 
-// The maximum amount of decoded image data we'll willingly keep around (we
-// might keep around more than this, but we'll try to get down to this value).
-// (This is intentionally on the high side; see bug 746055.)
-pref("image.mem.max_decoded_image_kb", 256000);
-
 // Is the sidebar positioned ahead of the content browser
 pref("sidebar.position_start", true);
 
 // Block insecure active content on https pages
 pref("security.mixed_content.block_active_content", true);
 
 // Show degraded UI for http pages with password fields.
 pref("security.insecure_password.ui.enabled", true);
--- a/mobile/android/chrome/content/MemoryObserver.js
+++ b/mobile/android/chrome/content/MemoryObserver.js
@@ -36,19 +36,16 @@ var MemoryObserver = {
           tabs[i].zombify();
         }
       }
     }
 
     // Change some preferences temporarily for only this session
     let defaults = Services.prefs.getDefaultBranch(null);
 
-    // Reduce the amount of decoded image data we keep around
-    defaults.setIntPref("image.mem.max_decoded_image_kb", 0);
-
     // Stop using the bfcache
     if (!Services.prefs.getBoolPref("browser.sessionhistory.bfcacheIgnoreMemoryPressure")) {
       this._defaultMaxContentViewers = defaults.getIntPref(MAX_CONTENT_VIEWERS_PREF);
       defaults.setIntPref(MAX_CONTENT_VIEWERS_PREF, 0);
     }
   },
 
   handleEnoughMemory: function() {