Bug 172343

Summary: Speedometer 2.0: Elem test isn't updating DOM during the measurement
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Tools / TestsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: addyo, cdumez, fpizlo, ggaren, koivisto, lforschler, saam
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 172339    
Attachments:
Description Flags
Fixes the Elm test
none
Removed superflous call to console.log koivisto: review+

Ryosuke Niwa
Reported 2017-05-18 22:25:14 PDT
Elm has its own work queue which gets executed in setTimeout and requestAnimationFrame. We need to manually trigger these functions to make a meaningful measurement.
Attachments
Fixes the Elm test (4.40 KB, patch)
2017-05-18 22:33 PDT, Ryosuke Niwa
no flags
Removed superflous call to console.log (4.36 KB, patch)
2017-05-19 01:49 PDT, Ryosuke Niwa
koivisto: review+
Ryosuke Niwa
Comment 1 2017-05-18 22:33:19 PDT
Created attachment 310618 [details] Fixes the Elm test
Ryosuke Niwa
Comment 2 2017-05-18 22:36:41 PDT
Another approach is to wrap each callback to rAF and measure the time spent in each rAF and wait for all rAF callbacks to be done. Unfortunately, this would require quite a bit of reworking in the way Speedometer works, and this is something I thought about it very carefully during the initial development of the benchmark and decided not go with since it really increases the complexity of the benchmark, and makes it really hard to get traces, etc...
Ryosuke Niwa
Comment 3 2017-05-19 01:49:22 PDT
Created attachment 310634 [details] Removed superflous call to console.log
Antti Koivisto
Comment 4 2017-05-19 02:56:33 PDT
Comment on attachment 310634 [details] Removed superflous call to console.log View in context: https://bugs.webkit.org/attachment.cgi?id=310634&action=review > PerformanceTests/Speedometer/resources/tests.js:421 > + const callbacks = contentWindow.rAFCallbackList; > + var i = 0; Why 'const' but not 'let'?
Ryosuke Niwa
Comment 5 2017-05-19 03:02:43 PDT
Comment on attachment 310634 [details] Removed superflous call to console.log View in context: https://bugs.webkit.org/attachment.cgi?id=310634&action=review >> PerformanceTests/Speedometer/resources/tests.js:421 >> + var i = 0; > > Why 'const' but not 'let'? Oops, would use var
Ryosuke Niwa
Comment 6 2017-05-19 03:09:15 PDT
Note You need to log in before you can comment on or make changes to this bug.