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)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ting, Assigned: gweng)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
timdream
: review+
Details | Review
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
Priority: P1 → --
What if we call updateClock() before transfering to LockScreenClockWidgetTick in LockScreenClockWidgetSuspend.handleSourceEvent() for screenchange event?
Blocks: 1188232
No longer blocks: 1231042
Attached file Patch
We should profile it before we go further.
Somehow attachment 8701317 [details] [review] makes the clock won't get updated, updateClock() is not called when screen on.
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
Attachment #8701317 - Attachment description: WIP patch → Patch
Assignee: nobody → gweng
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 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+
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.
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.

Attachment

General

Created:
Updated:
Size: