Repository navigation
Add RAF and setTimout based testRun initiation - #116
camillobruni wants to merge 3 commits into
Conversation
| await this._client.willRunTest(suite, test); | ||
| const runTest = this._runTest.bind(this, suite, test, this._page, resolve); | ||
| if (params.testInitiator === "raf") | ||
| window.requestAnimationFrame(runTest); |
There was a problem hiding this comment.
This isn't doing what we were discussing, or am I missing something. The idea was to have two raf callbacks for the same raf time. The first one would run the sync part of the test, the second one would capture the end time of the sync test (that way promise callbacks are part of the sync testing) and then the second raf callback would trigger setTimeout(,0) which records async time.
There was a problem hiding this comment.
correct, this is separate. I just realised that this part of my original PR had a massive performance impact, and I'd like to understand why. I think it would make sense to start each sub-tests with an empty task / microtask queue to limit the unmeasured overhead. This I think using an RAF to initiate the test might be a good idea.
There was a problem hiding this comment.
Is this the original PR #28 you're referring to or is it something else? Trying to understand what the final form might look like
|
Merging everything back to PR #28 . |
Seems like a lot of the perf different isn't coming actually from the change in the async measurements but rather in using RAF to start the test.
This PR adds
params.testInitiatorto change the mode for local investigation.RAF-based test initiation seems to decrease the score by 15% on Chrome, by 25% on Safari and 4% on Firefox, which is rather unexpected.