Closed Bug 1478566 Opened 6 years ago Closed 6 years ago

Reduce doc.render() calls in webrender during video playback.

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1474583

People

(Reporter: sotaro, Unassigned)

References

Details

Attachments

(1 file, 9 obsolete files)

Webrender calls doc.render() when display list is sent and when generate frame is requested. It seems redundant.
Assignee: nobody → sotaro.ikeda.g
Attachment #8995075 - Attachment is obsolete: true
Attachment #8995078 - Attachment is obsolete: true
Attachment #8995119 - Attachment is obsolete: true
Attachment #8995120 - Attachment is obsolete: true
Attachment #8995125 - Attachment is obsolete: true
(In reply to Sotaro Ikeda [:sotaro] from comment #0)
> Webrender calls doc.render() when display list is sent and when generate
> frame is requested. It seems redundant.

It's not totally redundant. We need the first doc.render() for hit-testing correctly. If we get rid of the render we still need to apply the sampled frame messages and rebuild the clip scroll tree and hit-tester. I think this bug basically a duplicate of https://github.com/servo/webrender/issues/2807
Also, for the record - while reducing doc.render() calls will help with CPU usage, it will actually be worse for talos perf. I realized this after investigating the talos regressions from my WIP for servo/webrender#2807 (which is now sadly bitrotted). The reason is that doing two renders makes the second render cheaper than the first. So with two renders the time flow looks something like this:

   Vsync                                        Vsync                                        Vsync
   |--------------------------------------------|--------------------------------------------|
     \recvDL/ \scene build/ \expensive render/   \cheap render/

and without it, it would look like this:

   Vsync                                        Vsync                                        Vsync
   |--------------------------------------------|--------------------------------------------|
     \recvDL/ \scene build/ \redo hittester/     \expensive render/

So the time to the *end* of the final render increases. And that's what a lot of the talos tests measure (specifically, they wait for the MozAfterPaint which gets dispatched after the end of the render).
Attachment #8995115 - Attachment is obsolete: true
Attachment #8995127 - Attachment description: patch another way - Reduce doc.render() calls in webrender → patch - Reduce doc.render() calls in webrender
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #8)
> (In reply to Sotaro Ikeda [:sotaro] from comment #0)
> > Webrender calls doc.render() when display list is sent and when generate
> > frame is requested. It seems redundant.
> 
> It's not totally redundant. We need the first doc.render() for hit-testing
> correctly. If we get rid of the render we still need to apply the sampled
> frame messages and rebuild the clip scroll tree and hit-tester. I think this
> bug basically a duplicate of https://github.com/servo/webrender/issues/2807

Thanks for the advice! But original intent of the bug is reduce doc.render() during video playback. It is related to Bug 1474583. So, the problem scope seems different than https://github.com/servo/webrender/issues/2807.
Summary: Reduce doc.render() calls in webrender → Reduce doc.render() calls in webrender during video playback.
Attachment #8995127 - Attachment is obsolete: true
Priority: -- → P3
Added PublishPipelineInfo handling.
Attachment #8995891 - Attachment is obsolete: true
Blocks: 1474583
(In reply to Sotaro Ikeda [:sotaro] from comment #12)
> attachment 8995891 [details] [diff] [review] also causes talos regression :(
> 
> https://treeherder.mozilla.org/perf.html#/
> compare?originalProject=try&originalRevision=42256b771d53533df3a9edba277bd7e4
> d191163f&newProject=try&newRevision=9c22b12c277465d21bce94354bad31d4b3831016&
> framework=1

The big regression seems to be addressed. In total, talos scores were improved.

https://treeherder.mozilla.org/perf.html#/compare?originalProject=try&originalRevision=d8be8e68c4a79bd69ce0a36bdce3547aa85985e4&newProject=try&newRevision=8ec437e88eba2082ce8c9e49eee5e5e4d3a57c2e&framework=1
Attachment #9001576 - Attachment is obsolete: true
This is going to be handled by Bug 1474583.
Assignee: sotaro.ikeda.g → nobody
No longer blocks: 1474583
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: