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
=== modified file 'plugins/Dash/abstractdashview.cpp'
--- plugins/Dash/abstractdashview.cpp 2015-08-19 13:56:21 +0000
+++ plugins/Dash/abstractdashview.cpp 2016-06-29 09:16:21 +0000
@@ -228,13 +228,24 @@
228 return changed;228 return changed;
229}229}
230230
231// TODO Use qEnvironmentVariableIntValue when Qt minimum version is 5.5
232static const int create_item_threshold_warning = qgetenv("U8_DASH_CREATE_ITEM_WARNING_THRESHOLD").toInt();
233
231QQuickItem *AbstractDashView::createItem(int modelIndex, bool asynchronous)234QQuickItem *AbstractDashView::createItem(int modelIndex, bool asynchronous)
232{235{
233 if (asynchronous && m_asyncRequestedIndex != -1)236 if (asynchronous && m_asyncRequestedIndex != -1)
234 return nullptr;237 return nullptr;
235238
239 QElapsedTimer timer;
240 if (Q_UNLIKELY(create_item_threshold_warning > 0)) {
241 timer.start();
242 }
243
236 m_asyncRequestedIndex = -1;244 m_asyncRequestedIndex = -1;
237 QObject* object = m_delegateModel->object(modelIndex, asynchronous);245 QObject* object = m_delegateModel->object(modelIndex, asynchronous);
246 if (Q_UNLIKELY(create_item_threshold_warning > 0 && timer.elapsed() >= create_item_threshold_warning)) {
247 qDebug() << "AbstractDashView::createItem for" << object << "in" << this << "took" << timer.elapsed() << "ms";
248 }
238 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);249 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
239 if (!item) {250 if (!item) {
240 if (object) {251 if (object) {
241252
=== modified file 'plugins/Dash/listviewwithpageheader.cpp'
--- plugins/Dash/listviewwithpageheader.cpp 2016-06-17 01:15:42 +0000
+++ plugins/Dash/listviewwithpageheader.cpp 2016-06-29 09:16:21 +0000
@@ -860,14 +860,25 @@
860 return changed;860 return changed;
861}861}
862862
863// TODO Use qEnvironmentVariableIntValue when Qt minimum version is 5.5
864static const int create_item_threshold_warning = qgetenv("U8_DASH_CREATE_ITEM_WARNING_THRESHOLD").toInt();
865
863ListViewWithPageHeader::ListItem *ListViewWithPageHeader::createItem(int modelIndex, bool asynchronous)866ListViewWithPageHeader::ListItem *ListViewWithPageHeader::createItem(int modelIndex, bool asynchronous)
864{867{
865// qDebug() << "CREATE ITEM" << modelIndex;868// qDebug() << "CREATE ITEM" << modelIndex;
866 if (asynchronous && m_asyncRequestedIndex != -1)869 if (asynchronous && m_asyncRequestedIndex != -1)
867 return nullptr;870 return nullptr;
868871
872 QElapsedTimer timer;
873 if (Q_UNLIKELY(create_item_threshold_warning > 0)) {
874 timer.start();
875 }
876
869 m_asyncRequestedIndex = -1;877 m_asyncRequestedIndex = -1;
870 QObject* object = m_delegateModel->object(modelIndex, asynchronous);878 QObject* object = m_delegateModel->object(modelIndex, asynchronous);
879 if (Q_UNLIKELY(create_item_threshold_warning > 0 && timer.elapsed() >= create_item_threshold_warning)) {
880 qDebug() << "ListViewWithPageHeader::createItem for" << object << "in" << this << "took" << timer.elapsed() << "ms";
881 }
871 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);882 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
872 if (!item) {883 if (!item) {
873 if (object) {884 if (object) {

Subscribers

People subscribed via source and target branches