Bug 172343 - Speedometer 2.0: Elem test isn't updating DOM during the measurement
Summary: Speedometer 2.0: Elem test isn't updating DOM during the measurement
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 172339
  Show dependency treegraph
 
Reported: 2017-05-18 22:25 PDT by Ryosuke Niwa
Modified: 2017-05-19 03:09 PDT (History)
7 users (show)

See Also:


Attachments
Fixes the Elm test (4.40 KB, patch)
2017-05-18 22:33 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Removed superflous call to console.log (4.36 KB, patch)
2017-05-19 01:49 PDT, Ryosuke Niwa
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 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.
Comment 1 Ryosuke Niwa 2017-05-18 22:33:19 PDT
Created attachment 310618 [details]
Fixes the Elm test
Comment 2 Ryosuke Niwa 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...
Comment 3 Ryosuke Niwa 2017-05-19 01:49:22 PDT
Created attachment 310634 [details]
Removed superflous call to console.log
Comment 4 Antti Koivisto 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'?
Comment 5 Ryosuke Niwa 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
Comment 6 Ryosuke Niwa 2017-05-19 03:09:15 PDT
Committed r217119: <http://trac.webkit.org/changeset/217119>