-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wptrunner] Lazily post testdriver result while polling the next message #49513
Merged
KyleJu
merged 2 commits into
web-platform-tests:master
from
jonathan-j-lee:wptrunner/lazy-testdriver
Dec 5, 2024
Merged
[wptrunner] Lazily post testdriver result while polling the next message #49513
KyleJu
merged 2 commits into
web-platform-tests:master
from
jonathan-j-lee:wptrunner/lazy-testdriver
Dec 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wpt-pr-bot
added
infra
wptrunner
The automated test runner, commonly called through ./wpt run
labels
Dec 4, 2024
WeizhongX
reviewed
Dec 4, 2024
WeizhongX
reviewed
Dec 4, 2024
... for symmetry with `send_message()`, which the executor uses to settle async testdriver calls browser-side. This is a no-op refactor that gives vendors more flexibility how to exchange messages with the test page.
jonathan-j-lee
force-pushed
the
wptrunner/lazy-testdriver
branch
from
December 4, 2024 20:25
9b69030
to
06ef5e1
Compare
WeizhongX
reviewed
Dec 4, 2024
WeizhongX
approved these changes
Dec 4, 2024
Currently, a typical testdriver call takes three WebDriver commands: 1. Poll the next browser -> executor message via the resume script 2. Execute the requested testdriver command (e.g., "element click" for `test_driver.click()`) 3. Post the result of (2) from executor -> browser, which resolves the call's promise The testharness executor repeats the above steps in an event loop until a message from (1) indicates the test is complete (or a helper thread times out the loop). This PR optimizes the speed of testdriver-heavy tests by combining (3) and (1) for pairs of consecutive calls by running them in the same "execute async script" invocation [a]. This PR should be entirely transparent to tests because the browser should eventually see all `send_message()` calls in the same order, with no changes in testdriver semantics. When tested downstream, no tests regress [b], and the following local test sees a modest speedup from 16 to 15.5 min: ```sh run_headless_shell_wpt external/wpt/editing/other/join-different-white-space-style-paragraphs.html -vv -j 1 ``` [a]: https://w3c.github.io/webdriver/#execute-async-script [b]: https://chromium-review.googlesource.com/c/chromium/src/+/6068186/1?tab=checks See Also: https://crbug.com/381927516
jonathan-j-lee
force-pushed
the
wptrunner/lazy-testdriver
branch
from
December 4, 2024 22:02
06ef5e1
to
6fea24d
Compare
auto-merge was automatically disabled
December 4, 2024 22:13
Pull request was closed
@KyleJu @DanielRyanSmith The CI failure looks like #49545 (occurring on other PRs), and this PR in |
KyleJu
approved these changes
Dec 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, a typical testdriver call takes three WebDriver commands:
test_driver.click()
)The testharness executor repeats the above steps in an event loop until a message from (1) indicates the test is complete (or a helper thread times out the loop).
This PR optimizes the speed of testdriver-heavy tests by combining (3) and (1) for pairs of consecutive calls by running them in the same "execute async script" invocation. This PR should be entirely transparent to tests because the browser should eventually see all
send_message()
calls in the same order.When tested downstream, no tests regress, and the following local test sees a modest speedup from 16 to 15.5 min:
See Also: https://crbug.com/381927516