Bug 825483 - Reduce bfcache size on low memory devices r=wesj
authorMark Finkle <mfinkle@mozilla.com>
Thu, 12 Feb 2015 09:02:31 -0500
changeset 256001 983c6b50a4319a69f45b4f548a7ff26144e9608c
parent 256000 a68f15690f03a57a02047603e24b6bd18619e280
child 256002 8839dac4cffc1738eecdcc5944c06de382609444
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs825483
milestone38.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 825483 - Reduce bfcache size on low memory devices r=wesj
mobile/android/chrome/content/MemoryObserver.js
--- a/mobile/android/chrome/content/MemoryObserver.js
+++ b/mobile/android/chrome/content/MemoryObserver.js
@@ -28,16 +28,19 @@ var MemoryObserver = {
       }
     }
 
     // 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
+    defaults.setIntPref("browser.sessionhistory.max_total_viewers", 0);
   },
 
   zombify: function(tab) {
     let browser = tab.browser;
     let data = browser.__SS_data;
     let extra = browser.__SS_extdata;
 
     // We need this data to correctly create and position the new browser