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
Script paint worklets speculative evaluation #17810
Script paint worklets speculative evaluation #17810
Conversation
Heads up! This PR modifies the following files:
|
This PR is dependent on #17634. |
558002f
to
5976728
Compare
☔ The latest upstream changes (presumably #17499) made this pull request unmergeable. Please resolve the merge conflicts. |
5976728
to
372f159
Compare
☔ The latest upstream changes (presumably #17634) made this pull request unmergeable. Please resolve the merge conflicts. |
372f159
to
5b61105
Compare
#17634 landed, so this PR is ready for review! |
☔ The latest upstream changes (presumably #17895) made this pull request unmergeable. Please resolve the merge conflicts. |
31a00a3
to
016af1a
Compare
☔ The latest upstream changes (presumably #17892) made this pull request unmergeable. Please resolve the merge conflicts. |
016af1a
to
ffd4c99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, just a question.
components/style/traversal.rs
Outdated
@@ -520,6 +522,8 @@ where | |||
} | |||
} | |||
|
|||
notify_paint_worklet(context, data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you want this outside of the if compute_self
block? Do we really always need to paint it even if the style is the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Fixed.
Also, do you have any numbers on this? |
☔ The latest upstream changes (presumably #17910) made this pull request unmergeable. Please resolve the merge conflicts. |
ffd4c99
to
c512f6f
Compare
@emilio I'm afraid not, to get decent numbers we'd need a page with reasonably complex style/layout and a paint worklet. All the paint worklet demos are quite simple at the moment :/ @bors-servo r=emilio |
📌 Commit c512f6f has been approved by |
🔒 Merge conflict |
☔ The latest upstream changes (presumably #17546) made this pull request unmergeable. Please resolve the merge conflicts. |
🔒 Merge conflict |
c512f6f
to
936dd3e
Compare
No actual numbers, but at least the cache is doing its job!
@bors-servo r=emilio |
📌 Commit 936dd3e has been approved by |
…valuation, r=emilio Script paint worklets speculative evaluation <!-- Please describe your changes on the following line: --> This PR speculatively calls paint worklets during style, which increases the concurrency, since it increases the chance that the cache will have the right result in it when it comes to layout. The speculation is wasted effort if the size of the element has changed, but this is often not the case. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17486 and #17369. - [X] These changes do not require tests because it's a performance improvement <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17810) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
This PR speculatively calls paint worklets during style, which increases the concurrency, since it increases the chance that the cache will have the right result in it when it comes to layout. The speculation is wasted effort if the size of the element has changed, but this is often not the case.
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is