Merge lp:~aacid/unity8/asyncLoaderForNavigationListViewDelegate into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Josh Arenson
Approved revision: 2496
Merged at revision: 2560
Proposed branch: lp:~aacid/unity8/asyncLoaderForNavigationListViewDelegate
Merge into: lp:unity8
Diff against target: 117 lines (+52/-49)
1 file modified
qml/Dash/DashNavigationList.qml (+52/-49)
To merge this branch: bzr merge lp:~aacid/unity8/asyncLoaderForNavigationListViewDelegate
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Josh Arenson Approve
Review via email: mp+298507@code.launchpad.net

Commit message

Make the delegate of DashNavigationList an async Loader

This list may be created while horizontally swiping through scopes
which means it may create all the visible delegates in a sync manner
while the swipe animation is happening and be jumpy

Previously the polish step of the list was taking around 230ms to in the amazon scope
now it's around 7ms without any noticeable delay in other places of the code

Description of the change

How to reproduce:
 * Have the Amazon scope at 4th position
 * Have a dummy as possible scope in 3rd position (i used 8coupon that is empty for me)
 * Without the patch
 * restart unity8-dash QSG_RENDER_TIMING=1
 * tailf ~/.cache/upstart/unity8-dash.log
 * Leave it finish outputting log
 * Horizontally swipe to the second scope
 * Around the middle of the new log lines you'll find a line with a high polish time, for me it was something like

qt.scenegraph.time.renderloop: Frame prepared with 'threaded' renderloop, polish=588, lock=0, blockedForSync=50, animations=5 - (on Gui thread) QQuickView(0x40ccf8)

Now repeat with the patch, the new debug line was

qt.scenegraph.time.renderloop: Frame prepared with 'threaded' renderloop, polish=349, lock=0, blockedForSync=33, animations=6 - (on Gui thread) QQuickView(0x10ebcf8)

You'll see the polish time has decreased considerably (it's still high but because other reasons, mainly related to CardTool being a bit slow)

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2495
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1622/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2162
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1144
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1144
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1144
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2190
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2097
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2097
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2097
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2088/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1622/rebuild

review: Needs Fixing (continuous-integration)
2496. By Albert Astals Cid

Merge

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2496
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1638/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2180/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2208
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2115
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2115
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2115
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2106
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2106/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2106
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2106/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2106
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2106/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2106
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2106/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2106
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2106/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2106
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2106/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2106
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2106/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2106
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2106/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2106
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2106/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1638/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Josh Arenson (josharenson) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes, performance is theoretically better :-)

* Did CI run pass? If not, please explain why.
Unrelated exception. Kicked off a new build just to see.

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2496
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1649/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2191
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1160/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1160/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1160/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2219
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2125
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2125
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2125
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2116/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2116/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2116/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2116/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2116/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2116/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2116/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2116/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2116/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1649/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2496
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1650/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2192
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1161
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1161
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1161
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2220
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2126
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2126
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2126
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2117/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1650/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/DashNavigationList.qml'
2--- qml/Dash/DashNavigationList.qml 2016-03-29 03:47:39 +0000
3+++ qml/Dash/DashNavigationList.qml 2016-06-29 12:23:18 +0000
4@@ -53,61 +53,64 @@
5 Repeater {
6 model: navigation && navigation.loaded ? navigation : null
7 clip: true
8- // FIXME Move to ListItem (and remove import) once 1556971 is fixed
9- delegate: ListItems.Empty {
10- objectName: root.objectName + "child" + index
11+ delegate: Loader {
12+ asynchronous: true
13 height: root.itemHeight
14 width: column.width
15- anchors {
16- left: column.left
17- right: column.right
18- leftMargin: units.gu(2)
19- rightMargin: units.gu(2)
20- }
21-
22- onClicked: root.enterNavigation(navigationId, allLabel != "" ? allLabel : label, hasChildren)
23-
24- Icon {
25- id: leftIcon
26+ // FIXME Move to ListItem (and remove import) once 1556971 is fixed
27+ sourceComponent: ListItems.Empty {
28+ objectName: root.objectName + "child" + index
29 anchors {
30- verticalCenter: parent.verticalCenter
31 left: parent.left
32- }
33- height: units.gu(2)
34- width: height
35- name: "tick"
36- color: "#3EB34F"
37- visible: isActive
38- }
39-
40- Label {
41- anchors {
42- verticalCenter: parent.verticalCenter
43- left: leftIcon.right
44- leftMargin: units.gu(1)
45- right: rightIcon.left
46+ right: parent.right
47+ leftMargin: units.gu(2)
48 rightMargin: units.gu(2)
49 }
50- text: label
51- color: isActive ? "#333333" : "#888888"
52- wrapMode: Text.Wrap
53- maximumLineCount: 2
54- elide: Text.ElideMiddle
55- }
56-
57- Icon {
58- id: rightIcon
59- anchors {
60- verticalCenter: parent.verticalCenter
61- right: parent.right
62- }
63- height: units.gu(2)
64- width: height
65- name: "go-next"
66- visible: hasChildren
67- }
68-
69- divider.visible: index != navigation.count - 1
70+
71+ onClicked: root.enterNavigation(navigationId, allLabel != "" ? allLabel : label, hasChildren)
72+
73+ Icon {
74+ id: leftIcon
75+ anchors {
76+ verticalCenter: parent.verticalCenter
77+ left: parent.left
78+ }
79+ height: units.gu(2)
80+ width: height
81+ name: "tick"
82+ color: "#3EB34F"
83+ visible: isActive
84+ }
85+
86+ Label {
87+ anchors {
88+ verticalCenter: parent.verticalCenter
89+ left: leftIcon.right
90+ leftMargin: units.gu(1)
91+ right: rightIcon.left
92+ rightMargin: units.gu(2)
93+ }
94+ text: label
95+ color: isActive ? "#333333" : "#888888"
96+ wrapMode: Text.Wrap
97+ maximumLineCount: 2
98+ elide: Text.ElideMiddle
99+ }
100+
101+ Icon {
102+ id: rightIcon
103+ anchors {
104+ verticalCenter: parent.verticalCenter
105+ right: parent.right
106+ }
107+ height: units.gu(2)
108+ width: height
109+ name: "go-next"
110+ visible: hasChildren
111+ }
112+
113+ divider.visible: index != navigation.count - 1
114+ }
115 }
116 }
117 }

Subscribers

People subscribed via source and target branches