Bug 1304387 - Re-enable predictor prefetch r=mayhemer
authorNicholas Hurley <hurley@todesschaf.org>
Wed, 21 Sep 2016 09:30:55 -0700
changeset 315197 81ea83beadf846f0d8f691162e5ef74cddf3c47a
parent 315196 d23c6cdd5c3767c932d3cae447436c6abd2e2b50
child 315198 13fe99de32f645984008a2ddc31923093a9fa43a
push id32563
push userihsiao@mozilla.com
push dateMon, 26 Sep 2016 11:18:33 +0000
treeherderautoland@eb840c87b5fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1304387
milestone52.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 1304387 - Re-enable predictor prefetch r=mayhemer MozReview-Commit-ID: 7NL5YWbg4gO
modules/libpref/init/all.js
netwerk/base/Predictor.cpp
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1867,21 +1867,17 @@ pref("network.ftp.idleConnectionTimeout"
 pref("network.dir.format", 2);
 
 // enables the prefetch service (i.e., prefetching of <link rel="next"> URLs).
 pref("network.prefetch-next", true);
 
 // enables the predictive service
 pref("network.predictor.enabled", true);
 pref("network.predictor.enable-hover-on-ssl", false);
-#ifdef NIGHTLY_BUILD
 pref("network.predictor.enable-prefetch", true);
-#else
-pref("network.predictor.enable-prefetch", false);
-#endif
 pref("network.predictor.page-degradation.day", 0);
 pref("network.predictor.page-degradation.week", 5);
 pref("network.predictor.page-degradation.month", 10);
 pref("network.predictor.page-degradation.year", 25);
 pref("network.predictor.page-degradation.max", 50);
 pref("network.predictor.subresource-degradation.day", 1);
 pref("network.predictor.subresource-degradation.week", 10);
 pref("network.predictor.subresource-degradation.month", 25);
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -324,21 +324,17 @@ NS_IMPL_ISUPPORTS(Predictor,
                   nsIInterfaceRequestor,
                   nsICacheEntryMetaDataVisitor,
                   nsINetworkPredictorVerifier)
 
 Predictor::Predictor()
   :mInitialized(false)
   ,mEnabled(true)
   ,mEnableHoverOnSSL(false)
-#ifdef NIGHTLY_BUILD
   ,mEnablePrefetch(true)
-#else
-  ,mEnablePrefetch(false)
-#endif
   ,mPageDegradationDay(PREDICTOR_PAGE_DELTA_DAY_DEFAULT)
   ,mPageDegradationWeek(PREDICTOR_PAGE_DELTA_WEEK_DEFAULT)
   ,mPageDegradationMonth(PREDICTOR_PAGE_DELTA_MONTH_DEFAULT)
   ,mPageDegradationYear(PREDICTOR_PAGE_DELTA_YEAR_DEFAULT)
   ,mPageDegradationMax(PREDICTOR_PAGE_DELTA_MAX_DEFAULT)
   ,mSubresourceDegradationDay(PREDICTOR_SUB_DELTA_DAY_DEFAULT)
   ,mSubresourceDegradationWeek(PREDICTOR_SUB_DELTA_WEEK_DEFAULT)
   ,mSubresourceDegradationMonth(PREDICTOR_SUB_DELTA_MONTH_DEFAULT)
@@ -382,21 +378,17 @@ Predictor::InstallObserver()
   }
 
   rv = obs->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   Preferences::AddBoolVarCache(&mEnabled, PREDICTOR_ENABLED_PREF, true);
   Preferences::AddBoolVarCache(&mEnableHoverOnSSL,
                                PREDICTOR_SSL_HOVER_PREF, false);
-#ifdef NIGHTLY_BUILD
   Preferences::AddBoolVarCache(&mEnablePrefetch, PREDICTOR_PREFETCH_PREF, true);
-#else
-  Preferences::AddBoolVarCache(&mEnablePrefetch, PREDICTOR_PREFETCH_PREF, false);
-#endif
   Preferences::AddIntVarCache(&mPageDegradationDay,
                               PREDICTOR_PAGE_DELTA_DAY_PREF,
                               PREDICTOR_PAGE_DELTA_DAY_DEFAULT);
   Preferences::AddIntVarCache(&mPageDegradationWeek,
                               PREDICTOR_PAGE_DELTA_WEEK_PREF,
                               PREDICTOR_PAGE_DELTA_WEEK_DEFAULT);
   Preferences::AddIntVarCache(&mPageDegradationMonth,
                               PREDICTOR_PAGE_DELTA_MONTH_PREF,