Converts dom.timeout.enable_budget_timer_throttling from varcache pref to static pref, removes entry from all.js, adds entry to StaticPrefList.yaml. Uses the all.js value and not the value declared in TimeoutManager.cpp. Since this removes the last varcache pref from TimeoutManager::Initialize(), I also removed the Initialize() function and its call in nsGlobalWindowInner.
Differential Revision: https://phabricator.services.mozilla.com/D39455
--HG--
extra : moz-landing-system : lando
Tracks calls made through TimeoutManager and makes sure they are
accounted for in the corresponding DocGroup
MozReview-Commit-ID: IvcoBrrZVWp
--HG--
extra : rebase_source : 66b3f6f1f47bc167da350d52ae87d3c0061a8b25
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.
MozReview-Commit-ID: 99648Lm46T5
Don't consider WebSockets, IndexedDB, etc when considering background
tabs for ordinary throttling since that makes us throttle way less
than we used to.
Deduct timeout execution time from a continuously regenerating
execution budget. Then throttle timeouts by using that budget in
TimeoutManager::MinSchedulingDelay to adjust the minimum value if
the budget is negative. The minimum value is adjusted to be a
value where the budget would have regenerated to be +0 ms.
The execution budget is clamped by values in ms defined in prefs:
* dom.timeout.background_throttling_max_budget: 50
* dom.timeout.foreground_throttling_max_budget: -1
A value equal or less than 0 means that the budget is infinite.
The regeneration rate can be controlled by the following prefs:
* dom.timeout.background_budget_regeneration_rate
* dom.timeout.foreground_budget_regeneration_rate
one each for foreground and background throttling.
To not starve timeouts indefinitely we clamp the minimum delay using
the pref:
* dom.timeout.budget_throttling_max_delay: 15000
The feature is behind the pref:
* dom.timeout.enable_budget_timer_throttling
Expose the utility framework for computing runnable execution time for
telemetry to be able to use it for managing budget times.
--HG--
extra : rebase_source : c7aba3d039116ed10597e7b58e2c6e7911cb493d
Measure execution time by adding telemetry probes for tracking
foreground, tracking background, non-tracking foreground and
non-tracking background timeouts.
--HG--
extra : source : 69439c0cd3e6d118681d1bb6586cb0a7b4bb85fc
Measure execution time by adding telemetry probes for tracking
foreground, tracking background, non-tracking foreground and
non-tracking background timeouts.
--HG--
extra : rebase_source : f638cc4422a777bbd093d5bbb2d5852c19b1c9d1
Clear the throttle tracking timer in ClearAllTimeouts. Also clear it
in Suspend, and if mThrottleTrackingTimeouts isn't set restart the
timer if the document hasn't loaded.
--HG--
extra : rebase_source : 8be5570265adda22775f6bf7528e39dde855429f