Closed Bug 957886 Opened 11 years ago Closed 11 years ago

Settings App has Large Chunks of > 100 ms Rasterize causing Jank

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:1.4+)

RESOLVED WORKSFORME
blocking-b2g 1.4+

People

(Reporter: mchang, Assigned: mchang)

References

Details

(Keywords: perf, Whiteboard: [c=handeye p=3 s= u=])

Attachments

(5 files)

See Profile - https://people.mozilla.org/~bgirard/cleopatra/#report=a9720695c1febb513afcffa3a7f7295d5a57b4b5 This is scrolling the Settings app w/ APZ + HWC enabled. We should find out why we have the large chunks of rasterize time.
Next steps here??
Flags: needinfo?(mchang)
Still digging.
Flags: needinfo?(mchang)
Blocks: 942750
Target Milestone: 1.3 C2/1.4 S2(17jan) → ---
1.3+: Blocks existing 1.3 blocker Bug 942750: Checkerboarding. Mason, please update the ETA whiteboard field.
blocking-b2g: --- → 1.3+
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
Whiteboard: [c=handeye p=5 s= u=] → [c=handeye p=5 s= u=1.3] [ETA:?]
This was a spin off from trying to solve bug 951221. Per https://bugzilla.mozilla.org/show_bug.cgi?id=951221#c15, we're close to 60 FPS and the original bug was closed. While this is still an issue, we don't need it for v1.3. Please make this a non-blocker.
blocking-b2g: 1.3+ → 1.3?
Flags: needinfo?(praghunath)
blocking-b2g: 1.3? → backlog
Flags: needinfo?(praghunath)
Priority: P1 → P2
Whiteboard: [c=handeye p=5 s= u=1.3] [ETA:?] → [c=handeye p=5 s= u=]
Blocking QC CS 1.4, can't leave in the backlog.
blocking-b2g: backlog → 1.4+
Attached video settings_painting.mov
Video of scrolling settings. We don't overpaint a lot, but a bit here and there, especially in the middle sections. I noticed we regressed hard on the layers overpainting. Last time I checked, we were around 300-400, we're up to 500-600. Investigating.
Attached video settingsLayers.mov
Pretty interesting video, every once in a while we see the layer kind of follow the displayport, which would explain the last layer in the layer tree.
I found the following actions bring down the layers from ~500-~600 to ~300. 1) Commenting out all the sections brings us down 100. 2) Removing the grayed out sections such as 'Sim Card' brings us down another layer. 3) Something about the Sim Toolkit operator servers causes another layer. The following do not affect overpainting: 1) Having the headers removed 2) Removing the form at the bottom of index.html. 3) Taking out the pack switches such as next to airplane mode.
When we bring the layers down to ~350, our painting times drastically drop from 100ms+ down to normal ~350 ish: https://people.mozilla.org/~bgirard/cleopatra/#report=f6c95518de135733050bbcea434062f45002be1d Investigating ways to have a full settings app w/ normal layer tree.
Looking at the layer tree when we do explode while scrolling, 2 things stand out. 1) The thebes layer after the ref layer goes from non-visible to fully visible. 2) The last container / thebes layer has weird dimensions and an opacity of 0.992, which is odd. Will need to investigate these two things.
Clearing blocking flag - per a drivers' decision, QC needs to flag individual bugs, not meta bugs, in order to have be CS blockers. We aren't allowing the everything under this meta bug list to be declared as blockers.
blocking-b2g: 1.4+ → ---
Also noticed that the ContainerLayer (0x45cd9800) gets a fixed position, which makes the thebes layer behind it visible. Looking into fixed position CSS.
We need this in order to hit the 1.4 goal.
blocking-b2g: --- → 1.4+
Depends on: 976299
Attached file Paint Dumping
Another thing I see is that we use the whole 320x480 for just the word 'Settings'. Might be able to optimize that.
I couldn't optimize the layer with the 'Settings' keyword. For testing, I used bug 917416, bug 976299 and disabled APZ and we have 0 overdraw (3rd FPS number). The extra layers w/ APZ come from the displayport growing / shrinking +- 1 viewport as we scroll. Investigating other things to see why we rasterize so much.
Profile up w/ 917416, 976299: https://people.mozilla.org/~bgirard/cleopatra/#report=64ea0500f3b29e1eacd01c1392831b3908cc1bc4 Looks like we spend a lot of time in the BufferConstructor. I'm wondering, because the displayport size is always changing, we have to reallocate / deallocate the displayport buffer while we scroll, then repaint all the content, which may be causing the large rasterize times.
After talking with :BenWa, we're wasting a lot of time alloc/dealloc displayport buffers as the displayport resizes. Tiling will fix that. With bug 917416 and bug 976299, we've done as much as we can for the settings app. We're pretty optimal w/ sync scrolling. Leaving this open until tiling lands, but nothing actionable.
Whiteboard: [c=handeye p=5 s= u=] → [c=handeye p=3 s= u=]
Priority: P2 → P1
Another profile, https://people.mozilla.org/~bgirard/cleopatra/#report=d5c3f963091f5d99937fac82fb0e8273b10fd9c4&search=pgralloc Looks like we're gated by pgralloc again. Tiling should fix that.
Tested with tiling enabled since it's turned on by default now. Profile: https://people.mozilla.org/~bgirard/cleopatra/#report=231ac2f5c2de05d2ae02b67aad9637f3877e9f0e Gecko: 173054:23005b395ae8 Gaia: 6c93da506e79bd7641f2cc0958b531ab84ceefe1 Our largest rasterize times are ~50ms and don't happen very often. I also cannot checkerboard the Settings app no matter how fast I scroll. Awesome stuff with tiling! Closing this as works for me as all dependent bugs with the settings app have landed and we can't checkerboard.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: