Merge lp:~kill-animals/ubuntu-clock-app/1363968-no-animation-secondshand-updates-every-second into lp:ubuntu-clock-app

Proposed by Kill Animals
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 80
Merged at revision: 129
Proposed branch: lp:~kill-animals/ubuntu-clock-app/1363968-no-animation-secondshand-updates-every-second
Merge into: lp:ubuntu-clock-app
Diff against target: 193 lines (+28/-29)
3 files modified
app/clock/MainClock.qml (+1/-1)
app/components/AnalogMode.qml (+1/-2)
po/com.ubuntu.clock.pot (+26/-26)
To merge this branch: bzr merge lp:~kill-animals/ubuntu-clock-app/1363968-no-animation-secondshand-updates-every-second
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nekhelesh Ramananthan Approve
Review via email: mp+234618@code.launchpad.net

Commit message

Significantly reduced cpu usage by updating the rotation position every second, instead of millisecond.

Description of the change

This is the simplist version. It is not pretty, it is not disgusting; its simple, and low on CPU.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

FAILED: Continuous integration, rev:76
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~akiva/ubuntu-clock-app/1363968-no-animation-secondshand-updates-every-second/+merge/234618/+edit-commit-message

http://91.189.93.70:8080/job/ubuntu-clock-app-ci/469/
Executed test runs:
    SUCCESS: http://91.189.93.70:8080/job/generic-mediumtests-utopic-python3/327
        deb: http://91.189.93.70:8080/job/generic-mediumtests-utopic-python3/327/artifact/work/output/*zip*/output.zip
    SUCCESS: http://91.189.93.70:8080/job/ubuntu-clock-app-utopic-amd64-ci/116

Click here to trigger a rebuild:
http://91.189.93.70:8080/job/ubuntu-clock-app-ci/469/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

I will have to check with the design team if they are okay with the visual change.

#blocked on design decision

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

#unblocked I talked to the designers and they have agreed to this change :-). So the design decision is "Second hand should move every second and not every few milliseconds like it is now".

As far as code review goes for this MP, please also ensure that in the ClockPage.qml, the DateTime{} updateInterval is changes to,

updateInterval: 1000

Another fix that is required in your MP,

10 + rotation: analogTime.getSeconds() * 6

should be,

rotation: visible ? analogTime.getSeconds() * 6 : 0

The visible property is required for the world clocks.

Please implement the above fixes and we can merge this ASAP Tomorrow.

review: Needs Fixing
Revision history for this message
Kill Animals (kill-animals) wrote :

well do

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Sry, I was referring to the update interval at https://bazaar.launchpad.net/~akiva/ubuntu-clock-app/1363968-no-animation-secondshand-updates-every-second/view/head:/app/clock/MainClock.qml#L42 where it is 10ms for the analog mode. That needs to be changed to,

updateInterval: 1000

Also, we are way past the UI freeze to accept. UI changes will be accepted only if they improve performance or are considered critical by the design team.

10 + scale: rotation % 480 === 0 ? 1.25 : 1

I am afraid you will have to remove this.

review: Needs Fixing
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

lgtm! Thnx for the performance patch :-)

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/clock/MainClock.qml'
2--- app/clock/MainClock.qml 2014-08-24 12:47:50 +0000
3+++ app/clock/MainClock.qml 2014-10-07 08:02:16 +0000
4@@ -39,7 +39,7 @@
5
6 DateTime {
7 id: localTimeSource
8- updateInterval: isDigital ? 1000 : 10
9+ updateInterval: 1000
10 }
11
12 /*
13
14=== modified file 'app/components/AnalogMode.qml'
15--- app/components/AnalogMode.qml 2014-08-24 12:47:50 +0000
16+++ app/components/AnalogMode.qml 2014-10-07 08:02:16 +0000
17@@ -76,8 +76,7 @@
18 visible: showSeconds
19 source: "../graphics/Second_Hand.png"
20 fillMode: Image.PreserveAspectFit
21- rotation: visible ? ((360 * ((analogTime.getSeconds() * 1000) +
22- analogTime.getMilliseconds())) / 60000) : 0
23+ rotation: visible ? analogTime.getSeconds() * 6 : 0
24 }
25
26 Image {
27
28=== modified file 'po/com.ubuntu.clock.pot'
29--- po/com.ubuntu.clock.pot 2014-09-25 09:41:45 +0000
30+++ po/com.ubuntu.clock.pot 2014-10-07 08:02:16 +0000
31@@ -8,7 +8,7 @@
32 msgstr ""
33 "Project-Id-Version: \n"
34 "Report-Msgid-Bugs-To: \n"
35-"POT-Creation-Date: 2014-09-25 11:41+0200\n"
36+"POT-Creation-Date: 2014-10-07 01:01-0700\n"
37 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
38 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
39 "Language-Team: LANGUAGE <LL@li.org>\n"
40@@ -33,45 +33,45 @@
41 msgstr ""
42
43 #: ../app/alarm/AlarmLabel.qml:30 ../app/alarm/AlarmLabel.qml:56
44-#: ../app/alarm/EditAlarmPage.qml:299
45+#: ../app/alarm/EditAlarmPage.qml:300
46 msgid "Label"
47 msgstr ""
48
49-#: ../app/alarm/AlarmList.qml:81 ../app/alarm/AlarmPage.qml:125
50+#: ../app/alarm/AlarmList.qml:81 ../app/alarm/AlarmPage.qml:108
51 #: ../app/worldclock/UserWorldCityList.qml:103
52 msgid "Delete"
53 msgstr ""
54
55-#: ../app/alarm/AlarmPage.qml:28 ../app/ubuntu-clock-app.qml:103
56+#: ../app/alarm/AlarmPage.qml:26 ../app/ubuntu-clock-app.qml:103
57 msgid "Alarms"
58 msgstr ""
59
60-#: ../app/alarm/AlarmPage.qml:45 ../app/alarm/EditAlarmPage.qml:47
61+#: ../app/alarm/AlarmPage.qml:43 ../app/alarm/EditAlarmPage.qml:47
62 #: ../app/alarm/EditAlarmPage.qml:174
63 msgid "Alarm"
64 msgstr ""
65
66-#: ../app/alarm/AlarmPage.qml:75 ../app/worldclock/WorldCityList.qml:66
67+#: ../app/alarm/AlarmPage.qml:58 ../app/worldclock/WorldCityList.qml:68
68 msgid "Back"
69 msgstr ""
70
71-#: ../app/alarm/AlarmPage.qml:93
72+#: ../app/alarm/AlarmPage.qml:79
73 msgid "Select None"
74 msgstr ""
75
76-#: ../app/alarm/AlarmPage.qml:95 ../app/alarm/AlarmRepeat.qml:35
77+#: ../app/alarm/AlarmPage.qml:81 ../app/alarm/AlarmRepeat.qml:35
78 msgid "Select All"
79 msgstr ""
80
81-#: ../app/alarm/AlarmPage.qml:154
82+#: ../app/alarm/AlarmPage.qml:137
83 msgid "No saved alarms"
84 msgstr ""
85
86-#: ../app/alarm/AlarmPage.qml:155
87+#: ../app/alarm/AlarmPage.qml:138
88 msgid "Tap the + icon to add an alarm"
89 msgstr ""
90
91-#: ../app/alarm/AlarmRepeat.qml:31 ../app/alarm/EditAlarmPage.qml:289
92+#: ../app/alarm/AlarmRepeat.qml:31 ../app/alarm/EditAlarmPage.qml:290
93 msgid "Repeat"
94 msgstr ""
95
96@@ -109,7 +109,7 @@
97 msgid "Change time and date"
98 msgstr ""
99
100-#: ../app/alarm/AlarmSound.qml:27 ../app/alarm/EditAlarmPage.qml:312
101+#: ../app/alarm/AlarmSound.qml:28 ../app/alarm/EditAlarmPage.qml:313
102 msgid "Sound"
103 msgstr ""
104
105@@ -137,7 +137,7 @@
106 msgid "Edit alarm"
107 msgstr ""
108
109-#: ../app/alarm/EditAlarmPage.qml:336
110+#: ../app/alarm/EditAlarmPage.qml:337
111 msgid "Delete alarm"
112 msgstr ""
113
114@@ -150,67 +150,67 @@
115 msgstr ""
116
117 #: ../app/worldclock/AddWorldCityButton.qml:61
118-#: ../app/worldclock/WorldCityList.qml:52
119+#: ../app/worldclock/WorldCityList.qml:54
120 msgid "City"
121 msgstr ""
122
123 #. TRANSLATORS: this indicates if the time in a world clock
124 #. is behind or ahead of the time at the current location
125-#: ../app/worldclock/UserWorldCityDelegate.qml:140
126+#: ../app/worldclock/UserWorldCityDelegate.qml:142
127 msgid "behind"
128 msgstr ""
129
130-#: ../app/worldclock/UserWorldCityDelegate.qml:141
131+#: ../app/worldclock/UserWorldCityDelegate.qml:143
132 msgid "ahead"
133 msgstr ""
134
135 #. TRANSLATORS: the first argument is hour, followed by
136 #. minute, and the translation for either 'behind' or
137 #. 'ahead'
138-#: ../app/worldclock/UserWorldCityDelegate.qml:151
139+#: ../app/worldclock/UserWorldCityDelegate.qml:153
140 #, qt-format
141 msgid "%1h %2m %3"
142 msgstr ""
143
144 #. TRANSLATORS: the first argument is hour, followed by the
145 #. translation for either 'behind' or 'ahead'
146-#: ../app/worldclock/UserWorldCityDelegate.qml:160
147+#: ../app/worldclock/UserWorldCityDelegate.qml:162
148 #, qt-format
149 msgid "%1h %2"
150 msgstr ""
151
152 #. TRANSLATORS: the first argument is minute, followed by the
153 #. translation for either 'behind' or 'ahead'
154-#: ../app/worldclock/UserWorldCityDelegate.qml:168
155+#: ../app/worldclock/UserWorldCityDelegate.qml:170
156 #, qt-format
157 msgid "%1m %2"
158 msgstr ""
159
160-#: ../app/worldclock/UserWorldCityDelegate.qml:174
161+#: ../app/worldclock/UserWorldCityDelegate.qml:176
162 msgid "Same time"
163 msgstr ""
164
165-#: ../app/worldclock/WorldCityList.qml:40
166+#: ../app/worldclock/WorldCityList.qml:41
167 msgid "Select a city"
168 msgstr ""
169
170-#: ../app/worldclock/WorldCityList.qml:79
171+#: ../app/worldclock/WorldCityList.qml:82
172 msgid "Search..."
173 msgstr ""
174
175-#: ../app/worldclock/WorldCityList.qml:156
176+#: ../app/worldclock/WorldCityList.qml:159
177 msgid "Searching for a city"
178 msgstr ""
179
180-#: ../app/worldclock/WorldCityList.qml:161
181+#: ../app/worldclock/WorldCityList.qml:164
182 msgid "No City Found"
183 msgstr ""
184
185-#: ../app/worldclock/WorldCityList.qml:167
186+#: ../app/worldclock/WorldCityList.qml:170
187 msgid "Unable to connect."
188 msgstr ""
189
190-#: ../app/worldclock/WorldCityList.qml:168
191+#: ../app/worldclock/WorldCityList.qml:171
192 msgid "Please check your network connection and try again"
193 msgstr ""
194

Subscribers

People subscribed via source and target branches