Closed
Bug 950250
Opened 11 years ago
Closed 11 years ago
Settings App Should Have a Scrollable Opaque Layer behind The Scrollable Content
Categories
(Firefox OS Graveyard :: Gaia::Settings, defect, P1)
Tracking
(blocking-b2g:1.3+, b2g-v1.3 fixed)
Tracking | Status | |
---|---|---|
b2g-v1.3 | --- | fixed |
People
(Reporter: mchang, Assigned: mchang)
References
Details
(Keywords: perf, Whiteboard: [c=handeye p=2 s= u=1.3])
Attachments
(5 files, 4 obsolete files)
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Here's a patch that doesn't insert an opaque background, but was an interesting thing I found while playing with the CSS. It removes 1 layer of overpainting according to the FPS counters. This is with APZ enabled. The layer tree doesn't look quite right though since the ContainerLayers are smashed together along with the Thebes layer.
Attachment #8356334 -
Flags: review?(bgirard)
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
Here's a different approach where we insert another div and force that to be opaque. This is just a few of the many elements which we'd have to modify which I don't like. Actually just changing the inner div and trying to make it scroll with the content with the background-attachment property doesn't work. Any ideas why that won't work?
Attachment #8356358 -
Flags: review?(bgirard)
Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
1.3+; blocks a 1.3 CS blocker.
blocking-b2g: --- → 1.3+
Priority: P2 → P1
Whiteboard: [c=handeye p=2 s= u=] → [c=handeye p=2 s= u=1.3]
Assignee | ||
Comment 7•11 years ago
|
||
Doesn't seem like just removing the background color is a good option. We get a fairly consistent 17 ms layout time which is too long.
Attachment #8356334 -
Attachment is obsolete: true
Attachment #8356336 -
Attachment is obsolete: true
Attachment #8356334 -
Flags: review?(bgirard)
Assignee | ||
Comment 8•11 years ago
|
||
We save some amount of time on layout portion. For the first 5 frames, we improve an average of 7ms per layout. Rasterize times are just a little worse, but without a scrollable background, we get larger and more frequent chunks of over 100 ms rasterize times, which is causing the jank. Scrollable div approach looks like the winner here.
Assignee | ||
Updated•11 years ago
|
Attachment #8357498 -
Attachment description: Patch w/ Scrollable Div → Profile w/ Scrollable Div
Attachment #8357498 -
Attachment filename: file_950250.txt → #report=7e87cf8d9a88ead74bea1c0415344da267ad2824
Assignee | ||
Comment 9•11 years ago
|
||
Patch that inserts a surrounding <div> around scrollable content to optimize the layout engine. We remove a single layer and drop our over painting from ~400 to ~300 w/ APZ. If there is a better way to insert extra <divs> around scrollable content please let me know. Thanks!
Attachment #8356358 -
Attachment is obsolete: true
Attachment #8356358 -
Flags: review?(bgirard)
Attachment #8357511 -
Flags: review?(kaze)
Attachment #8357511 -
Flags: review?(bgirard)
Updated•11 years ago
|
Attachment #8357511 -
Flags: feedback?(arthur.chen)
Comment 10•11 years ago
|
||
I’m a bit sad to insert yet another <div> into every panel, especially as I don’t understand the rationale here.
What is the point of this patch? Is that to improve the first paint time, or to have a smoother panning?
Are you saying that all containers with overflow need an additional inner container to scroll smoothly? If that’s true, it sounds like a bad Gecko bug that will hit us for web content too, right?
Updated•11 years ago
|
Flags: needinfo?(mchang)
Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Fabien Cazenave [:kaze] from comment #10)
> I’m a bit sad to insert yet another <div> into every panel, especially as I
> don’t understand the rationale here.
I'm also a bit sad to insert another <div> into the panel. The problem is that currently, the parent <div> isn't scrolling with the content. If you change the background-image to a picture, you can see that it's not scrolling with the content. If we change it to scroll with the content, we should get smoother scrolling performance.
> What is the point of this patch? Is that to improve the first paint time, or
> to have a smoother panning?
Smoother scrolling.
> Are you saying that all containers with overflow need an additional inner
> container to scroll smoothly? If that’s true, it sounds like a bad Gecko bug
> that will hit us for web content too, right?
Not in all cases, at least in a basic website I haven't seen Gecko show this behavior. I'm not exactly sure why Settings app demonstrates this. Benwa, can you answer this? Thanks!
Flags: needinfo?(mchang) → needinfo?(bgirard)
Comment 12•11 years ago
|
||
(In reply to Fabien Cazenave [:kaze] from comment #10)
> Are you saying that all containers with overflow need an additional inner
> container to scroll smoothly? If that’s true, it sounds like a bad Gecko bug
> that will hit us for web content too, right?
It's not a bad bug in gecko. It's how scrolling is spec'ed in CSS it's harder to implement efficiently. If the background doesn't scroll then we need to make the content above is transparent which is more expensive. If the contents of the div have a background itself then we no longer need to make it transparent.
The engine already detects some cases that it can optimize without changes to the page but not all of them. It doesn't detect all of them because doing so is difficult and/or expensive to compute. For short term perf wins it's easier to simplify the page then modify gecko to recognize this usage.
Flags: needinfo?(bgirard)
Updated•11 years ago
|
Attachment #8357511 -
Flags: review?(bgirard) → review+
Assignee | ||
Comment 13•11 years ago
|
||
Were we able to answer all your questions? If so, can we land this? Thanks!
Flags: needinfo?(kaze)
Updated•11 years ago
|
Attachment #8357511 -
Flags: review?(kaze) → review+
Flags: needinfo?(kaze)
Comment 14•11 years ago
|
||
Thanks for your explanations, and thanks for making the Settings app smoother.
Sorry for introducing a delay in the resolution of this bug. Let’s land this.
Comment 15•11 years ago
|
||
I'm not sure is this patch trying to fix the same problem as bug 938785? In which we added a background for all <ul> elements (the scrollable content), so that they won't be transparent. The background seems to be removed now by this commit (https://github.com/mozilla-b2g/gaia/commit/78b41c3698265308a53edd1eb64d52e264d27ca0). Can we simply add the background color back to fix the issue instead of modifying the DOM tree?
Flags: needinfo?(mchang)
Flags: needinfo?(bgirard)
Comment 16•11 years ago
|
||
Yes, that's probably a better fix. Let's add a comment so it doesn't get removed again.
Flags: needinfo?(bgirard)
Assignee | ||
Comment 17•11 years ago
|
||
That worked! Thanks for bringing up the better solution :)
Attachment #8357511 -
Attachment is obsolete: true
Attachment #8357511 -
Flags: feedback?(arthur.chen)
Attachment #8358540 -
Flags: review?(kaze)
Attachment #8358540 -
Flags: review?(arthur.chen)
Flags: needinfo?(mchang)
Comment 18•11 years ago
|
||
Comment on attachment 8358540 [details]
https://github.com/mozilla-b2g/gaia/pull/15209
Thanks for the patch! As we stop using document_bg.png as the background, please change it to the current background color.
Attachment #8358540 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 19•11 years ago
|
||
Comment on attachment 8358540 [details]
https://github.com/mozilla-b2g/gaia/pull/15209
Implemented Arthur's review.
Attachment #8358540 -
Flags: review?(arthur.chen)
Comment 20•11 years ago
|
||
Comment on attachment 8358540 [details]
https://github.com/mozilla-b2g/gaia/pull/15209
Please define the background-color in one place, thanks!
Attachment #8358540 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 21•11 years ago
|
||
Comment on attachment 8358540 [details]
https://github.com/mozilla-b2g/gaia/pull/15209
Hopefully the last time! Thanks!
Attachment #8358540 -
Flags: review?(arthur.chen)
Comment 22•11 years ago
|
||
So quick! But we still need this line `section[role="region"]`, please check the github comment.
Updated•11 years ago
|
Attachment #8358540 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 23•11 years ago
|
||
Comment on attachment 8358540 [details]
https://github.com/mozilla-b2g/gaia/pull/15209
Ok, hopefully last time again. Thanks much!
Attachment #8358540 -
Flags: review?(arthur.chen)
Comment 24•11 years ago
|
||
Comment on attachment 8358540 [details]
https://github.com/mozilla-b2g/gaia/pull/15209
r=me. Many thanks!
Attachment #8358540 -
Flags: review?(arthur.chen) → review+
Assignee | ||
Comment 25•11 years ago
|
||
Landed in master: b138f6884edd8c1cf6b8e675cfc4f9096a0333b3
Assignee | ||
Comment 26•11 years ago
|
||
uplifted to v1.3 - 7fc5eb67ff0aedbeb6874f670891e8e9b4505a16
Assignee | ||
Updated•11 years ago
|
Attachment #8358540 -
Flags: review?(kaze)
Updated•11 years ago
|
Target Milestone: --- → 1.3 C2/1.4 S2(17jan)
You need to log in
before you can comment on or make changes to this bug.
Description
•