Closed
Bug 1234731
Opened 9 years ago
Closed 9 years ago
Update lockscreen clock when screen turns on in a more direct manner
Categories
(Firefox OS Graveyard :: Gaia::System::Lockscreen, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ting, Assigned: gweng)
References
Details
Attachments
(1 file)
When screen turns on, the lockscreen clock gets updated after several asynchronous cycles that transfer from LockScreenClockWidgetSuspend to LockScreenClockWidgetTick state.
We should be able to update it immediately. In profile [1], it takes >60ms from LockScreenClockWidgetSuspend receiveing screenchange to updateClock().
[1] http://people.mozilla.org/~bgirard/cleopatra/#report=f3643e6d68c6d50ca04e09a08260d5f8ac171998
Reporter | ||
Updated•9 years ago
|
Priority: P1 → --
Reporter | ||
Comment 1•9 years ago
|
||
What if we call updateClock() before transfering to LockScreenClockWidgetTick in LockScreenClockWidgetSuspend.handleSourceEvent() for screenchange event?
Reporter | ||
Updated•9 years ago
|
Assignee | ||
Comment 2•9 years ago
|
||
We should profile it before we go further.
Reporter | ||
Comment 3•9 years ago
|
||
Somehow attachment 8701317 [details] [review] makes the clock won't get updated, updateClock() is not called when screen on.
Reporter | ||
Comment 4•9 years ago
|
||
The profile [1] with attachment 8701317 [details] [review] shows from transferToTick() to 1st nsRefreshDriver::Tick() now takes ~40ms, and it was ~90ms.
[1] http://people.mozilla.org/~bgirard/cleopatra/#report=0fa802172065d6958dad8014fd332ead851d7777
Assignee | ||
Updated•9 years ago
|
Attachment #8701317 -
Attachment description: WIP patch → Patch
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → gweng
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8701317 [details] [review]
Patch
Test works well on TaskCluster:
https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=793e41fec92307d0fc2a6db2e88d87c822af6aa0
Fixes:
* Call `updateClock` before the Suspend state transfers to Tick state, so that the rendering task will be queued in asynchronous queue earlier
* Added one more entry of Tick state to avoid do initialization twice
* Regards the condition for the entry, added a `previousState` property in the base component
* Added comments to describe the context and patch
Attachment #8701317 -
Flags: review?(timdream)
Comment 6•9 years ago
|
||
Comment on attachment 8701317 [details] [review]
Patch
This is sad. Maybe we don't really need to make the Clock state machine async at all?
Attachment #8701317 -
Flags: review?(timdream) → review+
Assignee | ||
Comment 7•9 years ago
|
||
It requires to re-write a specialized version of state machine with all the features we want during our long discussion. I feel maybe it's do-able but not worth to do that in this patch, for the addressed issue.
Assignee | ||
Comment 8•9 years ago
|
||
Landed the patch first. If we need further actions we can fire other bugs for more discussions.
master: https://github.com/mozilla-b2g/gaia/commit/71c56fafb76a12745a1b2c3e65b4868b64a297ac
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•