DescriptionDevTools: introduce WebInspector.Throttler
This patch introduces WebInspector.Throttler and uses it for throttling
calls to PageAgent in OverridesSupport, as well as throttling calls in StylesSourceMapping.
Throttler is a helper object that throttles execution of processes
(possibly asynchronous).
Throttler is created with a single parameter - throttle interval T.
Throttler satisfies to the following contract: for every two consecutive
runs performed by throttler, time between the end of the first run and
start of the second run is always greater or equal to T.
Throttler.schedule has additional second parameter "asSoonAsPossible" which essentially
sets throttler timeout into 0 for the next process run.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175956
Patch Set 1 #
Total comments: 2
Patch Set 2 : support asSoonAsPossible argument for schedule #Patch Set 3 : address @vsevik comments #Patch Set 4 : migrate StylesSourceMapping on throttler #Patch Set 5 : jsdoc for Throttler.FinishCallback #
Total comments: 18
Patch Set 6 : address @vsevik & @dgozman comments #
Total comments: 9
Patch Set 7 : reduce Throttler state as discussed with dgozman #Patch Set 8 : Remove unnecessary flag from Overrides support. #Patch Set 9 : fix testcase #
Total comments: 12
Patch Set 10 : add throttler test. #Patch Set 11 : address @vsevik & @aandrey comments #
Total comments: 2
Patch Set 12 : address @vsevik's nit #Messages
Total messages: 28 (0 generated)
|