Bug 1336598 P1 Tune setTimeout anti-flood constants to minimize jank. r=smaug
authorBen Kelly <ben@wanderview.com>
Sun, 05 Feb 2017 21:50:07 -0500
changeset 340891 901008a059b6affadd2af3be09ada6596e918889
parent 340890 042e2e826637ab04c7ea2b9e42f7508ca933330e
child 340892 79f1f1073258c46ff20721551ce4b604312f2571
push id31318
push usercbook@mozilla.com
push dateMon, 06 Feb 2017 11:56:59 +0000
treeherdermozilla-central@1cc159c7a044 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1336598
milestone54.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 1336598 P1 Tune setTimeout anti-flood constants to minimize jank. r=smaug
dom/base/TimeoutManager.cpp
--- a/dom/base/TimeoutManager.cpp
+++ b/dom/base/TimeoutManager.cpp
@@ -68,22 +68,22 @@ namespace {
 // The number of queued runnables within the TabGroup ThrottledEventQueue
 // at which to begin applying back pressure to the window.
 const uint32_t kThrottledEventQueueBackPressure = 5000;
 
 // The amount of delay to apply to timers when back pressure is triggered.
 // As the length of the ThrottledEventQueue grows delay is increased.  The
 // delay is scaled such that every kThrottledEventQueueBackPressure runnables
 // in the queue equates to an additional kBackPressureDelayMS.
-const double kBackPressureDelayMS = 500;
+const double kBackPressureDelayMS = 250;
 
 // This defines a limit for how much the delay must drop before we actually
 // reduce back pressure throttle amount.  This makes the throttle delay
 // a bit "sticky" once we enter back pressure.
-const double kBackPressureDelayReductionThresholdMS = 400;
+const double kBackPressureDelayReductionThresholdMS = 1000;
 
 // The minimum delay we can reduce back pressure to before we just floor
 // the value back to zero.  This allows us to ensure that we can exit
 // back pressure event if there are always a small number of runnables
 // queued up.
 const double kBackPressureDelayMinimumMS = 100;
 
 // Convert a ThrottledEventQueue length to a timer delay in milliseconds.