Chromium Code Reviews
Descriptionscheduler: Disable expensive timers during main thread user input
Previously, if the user was interacting with the device, we
would only allow timers to run during idle periods. Turns
out this strategy wasn't effective with workloads with very
expensive timers. This is because even the occasional idle
period is enough to let a long running timer execute,
potentially causing jank.
This patch changes the heuristic to be based on the
expected run time of each timer task. The estimation is
based on historical run times. If we have seen user input
recently and the main thread is on the critical path, we
now disable timer tasks completely for the duration of the
interaction.
As a follow up we may want to consider doing similar
estimation for loading tasks, as well as estimating
workloads from different domains separately.
BUG=523406
Committed: https://crrev.com/e8b4542c35200e17ea6cadfb1d3f0cab13a563bc
Cr-Commit-Position: refs/heads/master@{#344858}
Patch Set 1 #
Total comments: 8
Patch Set 2 : TaskQueueManager unit tests (+ fix a bug they found). #Patch Set 3 : Removed hardcoding. #
Total comments: 4
Patch Set 4 : Add a trace counter. #Patch Set 5 : Add test for estimator. #Patch Set 6 : Review comments. #Messages
Total messages: 23 (8 generated)
|