Last Comment Bug 778036 - Cross-process+omtc layers causing up to 5x excessive recomposites
: Cross-process+omtc layers causing up to 5x excessive recomposites
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics: Layers (show other bugs)
: Trunk
: ARM Gonk (Firefox OS)
: -- normal (vote)
: mozilla17
Assigned To: Matt Woodrow (:mattwoodrow)
:
Mentors:
Depends on:
Blocks: 780352 b2g-layers-work 761933
  Show dependency treegraph
 
Reported: 2012-07-26 21:32 PDT by Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
Modified: 2012-08-17 19:24 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Correctly check for presence of layer UserData (2.11 KB, patch)
2012-08-01 13:04 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Review
Add retaining of RefLayers so we don't have to rebuild them every time (4.57 KB, patch)
2012-08-01 13:04 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Review
Reduce the number of unnecessary operations passed during transactions (4.66 KB, patch)
2012-08-01 13:06 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Review
Only call SendNotifyCompositorTransaction on the first paint (2.34 KB, patch)
2012-08-01 13:08 PDT, Matt Woodrow (:mattwoodrow)
cjones.bugs: review+
Details | Diff | Review

Description Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-07-26 21:32:46 PDT
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 .
Comment 1 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-01 00:20:08 PDT
Matt is looking at this right now.
Comment 2 Matt Woodrow (:mattwoodrow) 2012-08-01 13:04:14 PDT
Created attachment 648049 [details] [diff] [review]
Correctly check for presence of layer UserData
Comment 3 Matt Woodrow (:mattwoodrow) 2012-08-01 13:04:47 PDT
Created attachment 648051 [details] [diff] [review]
Add retaining of RefLayers so we don't have to rebuild them every time
Comment 4 Matt Woodrow (:mattwoodrow) 2012-08-01 13:06:21 PDT
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.
Comment 5 Matt Woodrow (:mattwoodrow) 2012-08-01 13:08:36 PDT
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.
Comment 6 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-02 10:30:29 PDT
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!
Comment 7 Matt Woodrow (:mattwoodrow) 2012-08-03 17:39:57 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a7e9878a9d6
Comment 8 Ed Morley [:emorley] 2012-08-04 11:18:05 PDT
https://hg.mozilla.org/mozilla-central/rev/1a7e9878a9d6
Comment 10 Matt Brubeck (:mbrubeck) 2012-08-06 22:01:19 PDT
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
Comment 11 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-16 16:23:54 PDT
Really want to get this landed.  Fired off new try build

https://tbpl.mozilla.org/?tree=Try&rev=e5f3dce74a95
Comment 12 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-16 18:00:16 PDT
Hopefully with less -Werror bustage

https://tbpl.mozilla.org/?tree=Try&rev=d84b01e75b64

Note You need to log in before you can comment on or make changes to this bug.