Cross-process+omtc layers causing up to 5x excessive recomposites

RESOLVED FIXED in mozilla17

Status

()

Core
Graphics: Layers
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cjones, Assigned: mattwoodrow)

Tracking

(Blocks: 1 bug)

Trunk
mozilla17
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

STR
 (1) Flash an otoro with latest everything
 (2) Turn on the FPS monitor
 (3) Fire up the crystalskull webgl demo

The FPS monitor reports 30-40fps, but it's obviously running at 5-10fps.

 (4) Force crystalskull back in-process (https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/window_manager.js#L404)
 (5) Reinstall gaia
 (6) Fire up demo again

The performance is qualitatively the same (because we still have to read back), but this time it reports the more believable 5-10fps.

Something in our cross-process gfx pipeline is forcing us to recomposite *way* too much.

Betting it's sometime to do with http://mxr.mozilla.org/mozilla-central/source/dom/ipc/TabChild.cpp#1134 .
Summary: Cross-process layers causing up to 5x excessive recomposites → Cross-process+omtc layers causing up to 5x excessive recomposites
Matt is looking at this right now.
Assignee: nobody → matt.woodrow
(Assignee)

Comment 2

5 years ago
Created attachment 648049 [details] [diff] [review]
Correctly check for presence of layer UserData
Attachment #648049 - Flags: review?(roc)
(Assignee)

Comment 3

5 years ago
Created attachment 648051 [details] [diff] [review]
Add retaining of RefLayers so we don't have to rebuild them every time
Attachment #648051 - Flags: review?(roc)
(Assignee)

Comment 4

5 years ago
Created attachment 648054 [details] [diff] [review]
Reduce the number of unnecessary operations passed during transactions

This helps, but still doesn't really fix the issue. We still have the problem where FrameLayerBuilder sets the visible region / transform multiple times and this as marked as a mutation.

DLBI's layer tree comparison code can fix this properly, not sure if it's worth separating that out, or just taking this for now and waiting for DLBI.
Attachment #648054 - Flags: review?(roc)
(Assignee)

Comment 5

5 years ago
Created attachment 648055 [details] [diff] [review]
Only call SendNotifyCompositorTransaction on the first paint

This doesn't appear to cause any issues as the comment suggested it did.
Attachment #648055 - Flags: review?(jones.chris.g)
Attachment #648049 - Flags: review?(roc) → review+
Attachment #648051 - Flags: review?(roc) → review+
Attachment #648054 - Flags: review?(roc) → review+
Comment on attachment 648055 [details] [diff] [review]
Only call SendNotifyCompositorTransaction on the first paint

We still need this because of the SetCurrentRemoteFrame() hack in RenderFrameParent, but we probably can't kill that without breaking xul-fennec so this looks good.  Tested thoroughly on device.

Not sure what the problem was originally then ... oh well!
Attachment #648055 - Flags: review?(jones.chris.g) → review+
(Assignee)

Comment 7

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a7e9878a9d6
Whiteboard: [leave open]

Comment 8

5 years ago
https://hg.mozilla.org/mozilla-central/rev/1a7e9878a9d6
(Assignee)

Comment 9

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f6f9b74d685
https://hg.mozilla.org/integration/mozilla-inbound/rev/78ffaa79a3de
https://hg.mozilla.org/integration/mozilla-inbound/rev/28f8ce199bed
Whiteboard: [leave open]
Sorry, I had to back this out because it caused all native Android tests runs to crash/timeout:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a525ac9349eb
Blocks: 780352
Blocks: 761933
Really want to get this landed.  Fired off new try build

https://tbpl.mozilla.org/?tree=Try&rev=e5f3dce74a95
Hopefully with less -Werror bustage

https://tbpl.mozilla.org/?tree=Try&rev=d84b01e75b64
https://hg.mozilla.org/integration/mozilla-inbound/rev/c22f375fec38
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa5e8b9e9a44
https://hg.mozilla.org/integration/mozilla-inbound/rev/833cc8c891db
https://hg.mozilla.org/mozilla-central/rev/c22f375fec38
https://hg.mozilla.org/mozilla-central/rev/fa5e8b9e9a44
https://hg.mozilla.org/mozilla-central/rev/833cc8c891db
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.