Performance issues on Sketchfab.com with WebRender on
Categories
(Core :: Graphics: WebRender, defect, P2)
Tracking
()
People
(Reporter: rdoghi, Assigned: sotaro)
References
Details
Attachments
(3 files, 3 obsolete files)
[Affected versions]:
Beta 67.0a1
Steps :
- Launch the Firefox Browser and reach https://sketchfab.com/3d-models/the-old-knight-fb720a9fc67443a6907e849a2915f7b7
- Wait for the 3D image to load and then move it around, zoom in and out or rotate the image.
Expected Results :
The 3D image should move around and rotate smooth and without issues.
Actual Results :
With WebRender on the 3D image is lagging a lot and drops frames when rotated.
This issue was tested on a Windows 10 with Nvidia GT 730.
| Reporter | ||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 1•7 years ago
|
||
How well does it run for you with WebRender off?
Comment 2•7 years ago
|
||
I also notice a performance difference in fullscreen mode.
Sotaro can you reproduce this? If you can. Do you want to take a look at it?
| Assignee | ||
Comment 3•7 years ago
|
||
It seems better to uplift Bug 1526213 at first to optimize canvas.
| Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #3)
It seems better to uplift Bug 1526213 at first to optimize canvas.
I confirmed that fix of Bug 1526213 suppressed doc.build_frame() call during the STR in comment 0.
| Assignee | ||
Comment 5•7 years ago
•
|
||
I checked the STR of comment 0 with Firefox nightly on my Win10 Intel PC(Intel(R) HD Graphics P530). The performance was very bad compared to non-WebRender(Direct3D 11 (Advanced Layers)). Though on my win10 desktop PC(NVIDIA GeForce GTX 960), I did not saw the performance problem with nightly and with beta.
| Assignee | ||
Comment 6•7 years ago
•
|
||
Profile during the STR of comment 0 on my Win10 Intel PC(Intel(R) HD Graphics P530) with nightly.
Main thread of content was blocked at rx::Context11::flush() very long time. The blocked function was actually ID3D11DeviceContext::Flush(). And Render thread was also busy. From it, GPU driver seemed very busy and it seemed to cause the problem.
| Assignee | ||
Comment 7•7 years ago
|
||
I am going to look into the bug a bit more.
| Assignee | ||
Comment 8•7 years ago
•
|
||
It seems better to check if WaitForGPUQuery() works for the problem.
| Reporter | ||
Comment 9•7 years ago
|
||
Hi Jeff, it runs the same at first a bit laggy but after a few seconds it starts moving around a lot smoother as with WebRender ON it's still causing lag and dropped frames, and yes it's even more noticeable in Full Screen.
| Assignee | ||
Comment 10•7 years ago
|
||
| Assignee | ||
Comment 11•7 years ago
|
||
The following is win64-pgo build by applying attachment 9047666 [details] [diff] [review] to latest m-c.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=fd3cc82e790cc536923915579ed47c9468a77b3d
| Assignee | ||
Comment 12•7 years ago
|
||
:jrmuizel, can you check if the win64-pgo build in comment 11 mitigate the problem?
Comment 13•7 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #12)
:jrmuizel, can you check if the win64-pgo build in comment 11 mitigate the problem?
This build runs much better for me.
| Assignee | ||
Comment 14•7 years ago
•
|
||
Thanks for checking! The build run a lot better also for me. When the problem happened, too many gpu requests seemed to freeze D3D api on content main thread and render thread.
| Assignee | ||
Comment 15•7 years ago
|
||
Hmm, attachment 9047666 [details] [diff] [review] caused a lot of crashes during test.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=51cadae180aac7c10af21d4766c88bf41c5930f8
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 16•7 years ago
|
||
| Assignee | ||
Comment 17•7 years ago
|
||
By applying attachment 9048411 [details] [diff] [review], when the problem happened, amount of SharedSurface_ANGLEShareHandles became more than 30.
On my high end desktop Win10 PC, the amount was 8 at most.
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 18•7 years ago
|
||
| Assignee | ||
Comment 19•7 years ago
|
||
attachment 9048452 [details] [diff] [review] did not caused test failures. But it regressed glterrain a lot :(
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7f3d601531c4d536c23277c7f670be4ce4d05da8
| Assignee | ||
Comment 20•7 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #19)
attachment 9048452 [details] [diff] [review] did not caused test failures. But it regressed glterrain a lot :(
On possible workaround is that using Fence only when size of mRecycleTotalPool is large.
| Assignee | ||
Comment 21•7 years ago
|
||
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 22•7 years ago
•
|
||
When I revert Bug 1526213, the problem seemed to be disappeared. "doc.build_frame()" seemed to work as throttling webgl task. Since Bug 1526213 fix, we could skip doc.build_frame() during canvas empty transaction. It caused to webgl task more rapid and d3d11 api stalled by too many gpu tasks.
| Assignee | ||
Comment 23•7 years ago
•
|
||
By Bug 1526213, WebRenderBridgeParent::RecvEmptyTransaction() had a bug. It does not handle a case that resource update is handled by WebRenderTextureHostWrapper. In this case, txn.IsResourceUpdatesEmpty() became true and the function thought there was no resource update and the function returned DidComposite soon to client side. Then it caused over production at SharedSurface_ANGLEShareHandle().
| Assignee | ||
Comment 24•7 years ago
|
||
| Assignee | ||
Comment 25•7 years ago
•
|
||
attachment 9049875 [details] is going to loose the performance gain of glterrain of Bug 1526213, but it is correct behavior. Bug 1526213 made a huge over production of SharedSurface_ANGLEShareHandle(). More than 30 SharedSurface_ANGLEShareHandle instances were used for one WebGL. glterrain score does not show actual valid performance. It should be addressed.
| Assignee | ||
Comment 26•7 years ago
|
||
Confirmed that attachment 9049875 [details] address the problem of comment 0 on my Win10 Intel laptop.
Comment 27•7 years ago
|
||
Comment 28•7 years ago
|
||
Backed out changeset ec39fd695adb (bug 1531294) for webrender failures
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=233291875&repo=autoland&lineNumber=12947
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=ec39fd695adb0548e5c689d839843fa2e9b3acbd
Backout:
https://hg.mozilla.org/integration/autoland/rev/ede970649f873246c6f23b83924345827fb6d5c3
| Assignee | ||
Comment 29•7 years ago
•
|
||
(In reply to Dorel Luca [:dluca] from comment #28)
Backed out changeset ec39fd695adb (bug 1531294) for webrender failures
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=233291875&repo=autoland&lineNumber=12947
It is weird, the log said that webrender was not enabled. The change only affect to webrender enabled.
Tests are grouped as Wr2, but it does not mean webrender. The Wr2 is a group of Web platform tests.
| Assignee | ||
Comment 30•7 years ago
|
||
I wonder if Bug 1531863 is culprit.
| Assignee | ||
Comment 31•7 years ago
•
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #29)
(In reply to Dorel Luca [:dluca] from comment #28)
Backed out changeset ec39fd695adb (bug 1531294) for webrender failures
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=233291875&repo=autoland&lineNumber=12947It is weird, the log said that webrender was not enabled. The change only affect to webrender enabled.
latest auto land already caused same test failures.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=608247da49a0dab39f76fb8c2d69c9984b7ca342
| Assignee | ||
Comment 32•7 years ago
|
||
And confirmed that the failure did not happen with attachment 9049875 [details].
https://treeherder.mozilla.org/#/jobs?repo=try&revision=269be65b360338f0e7e1181bdbb8ed253e4476f6
| Assignee | ||
Comment 33•7 years ago
|
||
Comment 34•7 years ago
|
||
| bugherder | ||
Updated•7 years ago
|
| Reporter | ||
Comment 35•7 years ago
|
||
Hi this issue is Verified as fixed in Firefox 67.0a1 (2019-03-13)on Windows 10 with Nvidia GT 730.
Description
•