Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNext set of ClipScrollTree optimizations #2156
Conversation
|
Here is the Gecko try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=51369c294686d137fc80ace6ef8032bd5208ad50&group_state=expanded 97% done and no failures. |
|
I'd like to get #2146 landed before we land this, if possible (doing a gecko try now, hopefully it will be ready after that), since they will conflict a bit. This looks awesome from a quick scan though, it should help with CPU performance a lot! |
|
Reviewed 6 of 6 files at r1. webrender/src/prim_store.rs, line 1661 at r1 (raw file):
This uses Comments from Reviewable |
|
Just one question, otherwise this looks good to me (it will need a rebase after #2146 lands too). |
|
|
Rework ClipScrollTree::update, eliminated members which are now duplicated in ClipScrollNodeData and reducing the amount of unnecessary work. There are a few main thrusts here: 1. Don't do matrix operations if it's not necessary. Transform3D::pre_mul was showing up in CPU profiles, and this makes it much less significant. 2. Don't spend time setting up state if we are not going to recurse. 3. When we encounter an empty node (including those clipped out), do as little as possible. This includes setting update state or calculating things for ClipScrollNodeData.
Instead of duplicating the functionality of transform_rect in get_local_bounding_rect, just use the function from utils.rs.
|
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. webrender/src/prim_store.rs, line 1661 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
I think this should be okay. Both methods are using the same code to calculate the x and y coordinates of the final point.
transform_point2d should be slightly more efficient. Comments from Reviewable |
Instead of calculating some things that we no longer need for TransformedRect, we simply calculate the screen bounding rect. We can then completely remove TransformedRect. This significantly the presence of getting the screen bounding rect on the CPU profile.
5d9498d
to
1751ecc
Some of the remaining methods in util.rs are duplicated in euclid itself and others are now just simply unused.
|
Okay. I've rebased this branch as well as adding another, very simple, cleanup commit for util.rs. |
|
Nice! |
|
@bors-servo r+ |
|
|
Next set of ClipScrollTree optimizations This seems to cut the prominence of ClipScrollTree updates in my profile a great deal. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2156) <!-- Reviewable:end -->
|
|
2901a69
into
servo:master
mrobinson commentedDec 2, 2017
•
edited
This seems to cut the prominence of ClipScrollTree updates in my profile a great deal.
This change is