Closed Bug 1212322 Opened 9 years ago Closed 9 years ago

Set the scrollbar fade duration to 0

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox44 fixed)

RESOLVED FIXED
FxOS-S10 (30Oct)
Tracking Status
firefox44 --- fixed

People

(Reporter: vnicolas, Assigned: vnicolas)

Details

Attachments

(1 file)

I noticed that the scrollbar is generating a lot of frames in the profiler. Changing its animation duration to 0 reduce that to 2 frames (one when it appears, one when it dissapears). And tbh the difference is hardly noticeable...
Attachment #8670776 - Flags: review?(fabrice)
How much/what do we gain from that concretely? I kind of like our current scrollbars...
well, they should not be xul elements and move into the gfx stack instead but that's another issue!
(In reply to [:fabrice] Fabrice Desré from comment #2)
> How much/what do we gain from that concretely? I kind of like our current
> scrollbars...

In the profiler I see 9 refreshes generated for scrollbars.

Each of them  have a very small restyle (under 1ms), a very small rasterization (under 1ms) but an expensive display list building (11 to 13ms).

With the patch I see 2 refreshes for scrollbars. Values are the same.

So it may save some load times. It is hard to predict which metrics will be affected exactly has it depends on the app logic.
I also believe that it will save some battery.
(In reply to [:fabrice] Fabrice Desré from comment #3)
> well, they should not be xul elements and move into the gfx stack instead
> but that's another issue!

That's an old debate but as moving it to gfx should shape the display list calculation I tend to think that killing xul will make it cheaper to have a prettier effect. But yeah that's another issue.
Comment on attachment 8670776 [details] [diff] [review]
scrollbar.fade.duration.0.patch

Review of attachment 8670776 [details] [diff] [review]:
-----------------------------------------------------------------

Did you try to just use a shorter duration while not using 0? like 100 or 50?
Attachment #8670776 - Flags: review?(fabrice) → review+
I tried but this is very hard to see an animation at all.
Assignee: nobody → vnicolas
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/43350e8da63e
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S10 (30Oct)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: