Speedometer 2.0: Elem test isn't updating DOM during the measurement
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 May 2017 10:09:13 +0000 (10:09 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 May 2017 10:09:13 +0000 (10:09 +0000)
commit0fcfe7251380f552282edbf901d36ff44b18b32b
treecae3cc1d9353c323f0d98626f55663d126de98ed
parente212a2fd3e7a559a422ac96e2491688b4676a422
Speedometer 2.0: Elem test isn't updating DOM during the measurement
https://bugs.webkit.org/show_bug.cgi?id=172343

Reviewed by Antti Koivisto.

Elem test wasn't doing much work because it simply enqueues items into the work queue, which doesn't get
executed until the next requestAnimationFrame or setTimeout callback happens.

Expose elm's work function as contentWindow.elemWork and make the first use of rAF a synchronous callback
just as it would when requestAnimationFrame isn't defined, and make the second use of rAF queue up to
an array of callbacks, and have the test runner manually invoke each callback.

This increases the runtime of the Elm suite from 100ms to 300ms on Safari.

* Speedometer/resources/tests.js:
(processElmWorkQueue): Added. A helper which processes Elm's work queue and manually invokes render callbacks.
* Speedometer/resources/todomvc/functional-prog-examples/elm/dist/elm.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PerformanceTests/ChangeLog
PerformanceTests/Speedometer/resources/tests.js
PerformanceTests/Speedometer/resources/todomvc/functional-prog-examples/elm/dist/elm.js