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 upConvert ClipIds for Clips into indices in the ClipScrollTree #2427
Conversation
|
Here is the Gecko try job for this change: https://treeherder.mozilla.org/#/jobs?repo=try&revision=29be18dfbcc84d5ab006266ca437a6d303ec1ebb |
|
Reviewed 10 of 10 files at r1. webrender/src/frame_builder.rs, line 656 at r1 (raw file):
match would probably be tidier here webrender/src/hit_test.rs, line 298 at r1 (raw file):
This could potentially be a bitvec or something, I think. But it's no big deal - I can't imagine it ever showing up in a profile. webrender/src/render_task.rs, line 60 at r1 (raw file):
Not needed here - but it might make sense to move ClipChain to clip.rs as a follow up, since it's much more integral now? Comments from Reviewable |
|
There's a couple of minor (optional) comments above, r=me either way. I'll leave it to you to merge when ready (not sure if you need to discuss with @nical any conflicts likely with the PR he's working on). |
|
|
During display list flattening, we convert ClipIds for the clipping node into ClipChainIndex (as well as allocating space for them in the ClipChain array in the ClipScrollTree). This allows us to avoid doing a HashMap lookup for the ClipChain for every primitive run. It also moves us a little closer to a universal representation of ClipChains (both API-defined ClipChains and ones derived from the hierarchy of the ClipScroll tree). This causes the amount of time spend doing HashMap lookups to decrease in the profile, though they are still done for the positioning node. A second patch will reduce HashMap lookups for positioning nodes as well.
94c1d68
to
f11b8c7
|
Review status: 3 of 12 files reviewed at latest revision, 3 unresolved discussions. webrender/src/frame_builder.rs, line 656 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
Oh, yeah. That's a bit better. I've made the change. webrender/src/hit_test.rs, line 298 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
I'll save this one for later if that's okay. webrender/src/render_task.rs, line 60 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
This makes sense to me as well and is relatively harmless, so I've gone ahead and moved the code now. Comments from Reviewable |
|
@bors-servo r=glennw |
|
|
Convert ClipIds for Clips into indices in the ClipScrollTree During display list flattening, we convert ClipIds for the clipping node into ClipChainIndex (as well as allocating space for them in the ClipChain array in the ClipScrollTree). This allows us to avoid doing a HashMap lookup for the ClipChain for every primitive run. It also moves us a little closer to a universal representation of ClipChains (both API-defined ClipChains and ones derived from the hierarchy of the ClipScroll tree). This causes the amount of time spend doing HashMap lookups to decrease in the profile, though they are still done for the positioning node. A second patch will reduce HashMap lookups for positioning nodes as well. <!-- 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/2427) <!-- Reviewable:end -->
|
|
Looks like the build stalled so I will retry. |
|
@bors-servo retry |
Convert ClipIds for Clips into indices in the ClipScrollTree During display list flattening, we convert ClipIds for the clipping node into ClipChainIndex (as well as allocating space for them in the ClipChain array in the ClipScrollTree). This allows us to avoid doing a HashMap lookup for the ClipChain for every primitive run. It also moves us a little closer to a universal representation of ClipChains (both API-defined ClipChains and ones derived from the hierarchy of the ClipScroll tree). This causes the amount of time spend doing HashMap lookups to decrease in the profile, though they are still done for the positioning node. A second patch will reduce HashMap lookups for positioning nodes as well. <!-- 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/2427) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Convert ClipIds for Clips into indices in the ClipScrollTree During display list flattening, we convert ClipIds for the clipping node into ClipChainIndex (as well as allocating space for them in the ClipChain array in the ClipScrollTree). This allows us to avoid doing a HashMap lookup for the ClipChain for every primitive run. It also moves us a little closer to a universal representation of ClipChains (both API-defined ClipChains and ones derived from the hierarchy of the ClipScroll tree). This causes the amount of time spend doing HashMap lookups to decrease in the profile, though they are still done for the positioning node. A second patch will reduce HashMap lookups for positioning nodes as well. <!-- 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/2427) <!-- Reviewable:end -->
|
|
mrobinson commentedFeb 15, 2018
•
edited by larsbergstrom
During display list flattening, we convert ClipIds for the clipping node
into ClipChainIndex (as well as allocating space for them in the
ClipChain array in the ClipScrollTree). This allows us to avoid doing a
HashMap lookup for the ClipChain for every primitive run. It also moves
us a little closer to a universal representation of ClipChains (both
API-defined ClipChains and ones derived from the hierarchy of the
ClipScroll tree).
This causes the amount of time spend doing HashMap lookups to decrease
in the profile, though they are still done for the positioning node. A
second patch will reduce HashMap lookups for positioning nodes as well.
This change is