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

Proposed by Albert Astals Cid
Status: Work in progress
Proposed branch: lp:~aacid/unity8/add_create_item_debug_envvar
Merge into: lp:unity8
Diff against target: 58 lines (+22/-0)
2 files modified
plugins/Dash/abstractdashview.cpp (+11/-0)
plugins/Dash/listviewwithpageheader.cpp (+11/-0)
To merge this branch: bzr merge lp:~aacid/unity8/add_create_item_debug_envvar
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Josh Arenson Pending
Review via email: mp+298605@code.launchpad.net

Commit message

Add U8_DASH_CREATE_ITEM_WARNING_THRESHOLD envvar to debug item creation

It should not slow down non debug mode almost at all, QElasedTimer is very cheap

Description of the change

 * 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:2496
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1628/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2170/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2198
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2105
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2105
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2105
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2096/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2096
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2096/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2096
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2096/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2096/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2096
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2096/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2096
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2096/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2096/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2096
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2096/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2096
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2096/artifact/output/*zip*/output.zip

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

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

We still work on 5.4

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

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

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

review: Needs Fixing (continuous-integration)

Unmerged revisions

2497. By Albert Astals Cid

We still work on 5.4

2496. By Albert Astals Cid

Add U8_DASH_CREATE_ITEM_WARNING_THRESHOLD envvar to debug item creation

It should not slow down non debug mode almost at all, QElasedTimer is cheap

2495. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Dash/abstractdashview.cpp'
2--- plugins/Dash/abstractdashview.cpp 2015-08-19 13:56:21 +0000
3+++ plugins/Dash/abstractdashview.cpp 2016-06-29 09:16:21 +0000
4@@ -228,13 +228,24 @@
5 return changed;
6 }
7
8+// TODO Use qEnvironmentVariableIntValue when Qt minimum version is 5.5
9+static const int create_item_threshold_warning = qgetenv("U8_DASH_CREATE_ITEM_WARNING_THRESHOLD").toInt();
10+
11 QQuickItem *AbstractDashView::createItem(int modelIndex, bool asynchronous)
12 {
13 if (asynchronous && m_asyncRequestedIndex != -1)
14 return nullptr;
15
16+ QElapsedTimer timer;
17+ if (Q_UNLIKELY(create_item_threshold_warning > 0)) {
18+ timer.start();
19+ }
20+
21 m_asyncRequestedIndex = -1;
22 QObject* object = m_delegateModel->object(modelIndex, asynchronous);
23+ if (Q_UNLIKELY(create_item_threshold_warning > 0 && timer.elapsed() >= create_item_threshold_warning)) {
24+ qDebug() << "AbstractDashView::createItem for" << object << "in" << this << "took" << timer.elapsed() << "ms";
25+ }
26 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
27 if (!item) {
28 if (object) {
29
30=== modified file 'plugins/Dash/listviewwithpageheader.cpp'
31--- plugins/Dash/listviewwithpageheader.cpp 2016-06-17 01:15:42 +0000
32+++ plugins/Dash/listviewwithpageheader.cpp 2016-06-29 09:16:21 +0000
33@@ -860,14 +860,25 @@
34 return changed;
35 }
36
37+// TODO Use qEnvironmentVariableIntValue when Qt minimum version is 5.5
38+static const int create_item_threshold_warning = qgetenv("U8_DASH_CREATE_ITEM_WARNING_THRESHOLD").toInt();
39+
40 ListViewWithPageHeader::ListItem *ListViewWithPageHeader::createItem(int modelIndex, bool asynchronous)
41 {
42 // qDebug() << "CREATE ITEM" << modelIndex;
43 if (asynchronous && m_asyncRequestedIndex != -1)
44 return nullptr;
45
46+ QElapsedTimer timer;
47+ if (Q_UNLIKELY(create_item_threshold_warning > 0)) {
48+ timer.start();
49+ }
50+
51 m_asyncRequestedIndex = -1;
52 QObject* object = m_delegateModel->object(modelIndex, asynchronous);
53+ if (Q_UNLIKELY(create_item_threshold_warning > 0 && timer.elapsed() >= create_item_threshold_warning)) {
54+ qDebug() << "ListViewWithPageHeader::createItem for" << object << "in" << this << "took" << timer.elapsed() << "ms";
55+ }
56 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
57 if (!item) {
58 if (object) {

Subscribers

People subscribed via source and target branches