Skip to content
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

WebRender has a bad time with https://jrmuizel.github.io/perf-tests/moving-balls.html #1501

Closed
jrmuizel opened this issue Jul 19, 2017 · 10 comments

Comments

@jrmuizel
Copy link
Collaborator

jrmuizel commented Jul 19, 2017

Profiling servo running this test case shows about 50% of the time in WebRender. The rendering is also incorrect (the solid colors leak out of the borders)

@glennw
Copy link
Member

glennw commented Jul 20, 2017

Wow, of the 33ms spent in the backend thread, 20ms of that is DL deserialization and processing :(

@kvark
Copy link
Member

kvark commented Jul 20, 2017

Sounds like @gankro should be accused involved

@jrmuizel
Copy link
Collaborator Author

rust-lang/rust#31681 should help here.

@glennw
Copy link
Member

glennw commented Apr 6, 2018

This looks correct visually now, but the CPU performance is still a problem. Needs more investigation.

@kvark
Copy link
Member

kvark commented Apr 6, 2018

I took some measurements. CPU backend time is 50ms. Although, 2/3 of that appears to be spent in just waiting for messages (pthread_cond_wait). The rest is mostly spent on scene building.

On the CPU compositor time, GPU cache is only taking 3%, less then the Intel driver spent querying it's own extensions on each draw call (d'oh).

Is it possible for Gecko to use the dynamic transform properties here, avoiding the frame building cost?

@kvark
Copy link
Member

kvark commented Apr 6, 2018

I looked at the GPU profile, and there is more than expected number of draw calls there. We switch between solid/corder/edge ~50 times.

One thing that could help is a better batching policy, one that is based on the approximated screen coverage instead of a fixed number of past batches to look at.

Another thing I noticed is that the edge draw calls contributed nothing, because the edges have zero heights. I've implemented the extra checks in both the frame builder and the renderer to avoid issuing those calls in #2630, which brings down the total draw call count from 170+ to 120.

@jrmuizel
Copy link
Collaborator Author

jrmuizel commented Apr 6, 2018

Here's my profile:
https://perfht.ml/2H2fPnn

The biggest problem is style, but the render backend is spending 74ms moving memory around.

@kvark
Copy link
Member

kvark commented Apr 6, 2018

As @jrmuizel mentioned, we are also spending 18% of time allocating the space in our texture atlas. This time may be saved once we start re-using the clip masks between items (as mentioned by @glennw in #2626 (comment)), since a lot of the 2294 clips look similar:
clips

@gw3583
Copy link
Contributor

gw3583 commented Jun 18, 2018

Although this does still run very slowly in WR, it's significantly faster than vanilla Gecko (on my machine, at least). The rendering does look correct now. We can leave this open but it's low priority - the test case runs quite badly on all browsers I tested.

@gw3583
Copy link
Contributor

gw3583 commented Feb 1, 2019

This runs at a reasonable kind of frame rate given the content for me now.

@gw3583 gw3583 closed this as completed Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants