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
=== modified file 'qml/Dash/DashNavigationList.qml'
--- qml/Dash/DashNavigationList.qml 2016-03-29 03:47:39 +0000
+++ qml/Dash/DashNavigationList.qml 2016-06-29 12:23:18 +0000
@@ -53,61 +53,64 @@
53 Repeater {53 Repeater {
54 model: navigation && navigation.loaded ? navigation : null54 model: navigation && navigation.loaded ? navigation : null
55 clip: true55 clip: true
56 // FIXME Move to ListItem (and remove import) once 1556971 is fixed56 delegate: Loader {
57 delegate: ListItems.Empty {57 asynchronous: true
58 objectName: root.objectName + "child" + index
59 height: root.itemHeight58 height: root.itemHeight
60 width: column.width59 width: column.width
61 anchors {60 // FIXME Move to ListItem (and remove import) once 1556971 is fixed
62 left: column.left61 sourceComponent: ListItems.Empty {
63 right: column.right62 objectName: root.objectName + "child" + index
64 leftMargin: units.gu(2)
65 rightMargin: units.gu(2)
66 }
67
68 onClicked: root.enterNavigation(navigationId, allLabel != "" ? allLabel : label, hasChildren)
69
70 Icon {
71 id: leftIcon
72 anchors {63 anchors {
73 verticalCenter: parent.verticalCenter
74 left: parent.left64 left: parent.left
75 }65 right: parent.right
76 height: units.gu(2)66 leftMargin: units.gu(2)
77 width: height
78 name: "tick"
79 color: "#3EB34F"
80 visible: isActive
81 }
82
83 Label {
84 anchors {
85 verticalCenter: parent.verticalCenter
86 left: leftIcon.right
87 leftMargin: units.gu(1)
88 right: rightIcon.left
89 rightMargin: units.gu(2)67 rightMargin: units.gu(2)
90 }68 }
91 text: label69
92 color: isActive ? "#333333" : "#888888"70 onClicked: root.enterNavigation(navigationId, allLabel != "" ? allLabel : label, hasChildren)
93 wrapMode: Text.Wrap71
94 maximumLineCount: 272 Icon {
95 elide: Text.ElideMiddle73 id: leftIcon
96 }74 anchors {
9775 verticalCenter: parent.verticalCenter
98 Icon {76 left: parent.left
99 id: rightIcon77 }
100 anchors {78 height: units.gu(2)
101 verticalCenter: parent.verticalCenter79 width: height
102 right: parent.right80 name: "tick"
103 }81 color: "#3EB34F"
104 height: units.gu(2)82 visible: isActive
105 width: height83 }
106 name: "go-next"84
107 visible: hasChildren85 Label {
108 }86 anchors {
10987 verticalCenter: parent.verticalCenter
110 divider.visible: index != navigation.count - 188 left: leftIcon.right
89 leftMargin: units.gu(1)
90 right: rightIcon.left
91 rightMargin: units.gu(2)
92 }
93 text: label
94 color: isActive ? "#333333" : "#888888"
95 wrapMode: Text.Wrap
96 maximumLineCount: 2
97 elide: Text.ElideMiddle
98 }
99
100 Icon {
101 id: rightIcon
102 anchors {
103 verticalCenter: parent.verticalCenter
104 right: parent.right
105 }
106 height: units.gu(2)
107 width: height
108 name: "go-next"
109 visible: hasChildren
110 }
111
112 divider.visible: index != navigation.count - 1
113 }
111 }114 }
112 }115 }
113 }116 }

Subscribers

People subscribed via source and target branches