Closed Bug 926446 Opened 10 years ago Closed 10 years ago

Showing/Hiding the svg blurring effect on homescreen icons is expensive during app launch

Categories

(Firefox OS Graveyard :: Gaia::Homescreen, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vingtetun, Assigned: crdlc)

References

Details

(Keywords: perf, Whiteboard: [c=progress p= s=2013.10.25 u=])

Attachments

(1 file)

The line at https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/style/grid.css#L125 that create a blurring effect during app launch is expensive and cost some application launch time.

In order to not consume app launch time, I suggest the following strategy:
 - if the user clicks quickly, does not show the blurring effect at all. That's not perfect but that's ok since the click will be quickly followed by a app launch animation.

 - if the user clicks slowly (let's say the finger is pressed on the screen more than 140ms) then let's show the blur. Does not remove it right now when the user has clicked but instead let's delay that a little bit. This will prevent this to trigger a repaint during app launch.

I think that would also improve panning since right now the blurring effect is done when you start a pan.

Christian, can you have a look at that?
Flags: needinfo?(crdlc)
I will see it, no problem Vivien
Assignee: nobody → crdlc
Status: NEW → ASSIGNED
Flags: needinfo?(crdlc)
Attached file Patch v1
Hi Vivien, here you have the patch to implement your idea. I am pretty sure that some test on grid could fail with the new delay introduced but right now I am on a train and I don't have good connection so I prefer that you can take a look at my code while I will fix test tomorrow morning. See you in San Francisco ;)
Attachment #816662 - Flags: review?(21)
Comment on attachment 816662 [details]
Patch v1

I made some comments on github. Thanks for the quick patch :)
Attachment #816662 - Flags: review?(21)
Comment on attachment 816662 [details]
Patch v1

New features:

1) Quick tap -> no blurring effect in order to open the app or collection faster
2) Slow tap -> blurring effect but it is removed when the app or collection has been opened
3) The delay to apply blurring effect or not is configurable in build time (application-data.js)
4) Refactored all this behavior because this was duplicated in dock.js and grid.js files
5) Fast gesture to swipe between pages without blurring effect -> best FPS
Attachment #816662 - Flags: review?(21)
Comment on attachment 816662 [details]
Patch v1

I think it should work.
Attachment #816662 - Flags: review?(21) → review+
Landed in master

https://github.com/mozilla-b2g/gaia/commit/34c6aeb027728624a478f299a34c28a7f7b43e64
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Vivien, for which release is this targeted?
Flags: needinfo?(21)
Keywords: perf
Whiteboard: [c=progress p= s=2013.10.25 u=]
(In reply to Mike Lee [:mlee] from comment #7)
> Vivien, for which release is this targeted?

I think it changes too much the behavior to be fully safe for 1.2. For 1.2 I will mostly bet on bug 924702 and bug 925004 (part of it at least for having a fast path for certified apps). Those should be safe and globals :)
Flags: needinfo?(21)
Blocks: 924942
You need to log in before you can comment on or make changes to this bug.