DescriptionOnly schedule a widget update when necessary
The vast majority of the Timers scheduled in Blink come
from this one call in performPostLayoutTasks, at least
according to my survey of the key_silk_cases.
However updateWidget() already early-returns if
there are no widgets to update. This moves the
timer scheduling into its own function (so that the
FROM_HERE result is more descriptive) and also
checks the same early-return as updateWidget, just
before bothering to schedule the timer.
I do not expect this to have a performance impact, since
scheduling a timer should be cheap and in the common case
(no plugins) these timers would always just immediately
exit on firing but at least removing this timer schedule
will reduce chatter in our trace files if nothing else.
NOTRY=true
BUG=350592
R=abarth@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168883
Patch Set 1 #
Messages
Total messages: 16 (0 generated)
|