Merge lp://qastaging/~faenil/ubuntu-ui-toolkit/moreScrollbarOptimizations into lp://qastaging/ubuntu-ui-toolkit/staging

Proposed by Andrea Bernabei
Status: Merged
Approved by: Cris Dywan
Approved revision: 1954
Merged at revision: 2045
Proposed branch: lp://qastaging/~faenil/ubuntu-ui-toolkit/moreScrollbarOptimizations
Merge into: lp://qastaging/ubuntu-ui-toolkit/staging
Diff against target: 513 lines (+238/-43)
8 files modified
src/Ubuntu/Components/1.3/Scrollbar.qml (+35/-21)
src/Ubuntu/Components/Labs/Labs.pro (+1/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml (+37/-17)
src/Ubuntu/UbuntuToolkit/UbuntuToolkit.pro (+4/-2)
src/Ubuntu/UbuntuToolkit/privates/ucscrollbarutils.cpp (+44/-0)
src/Ubuntu/UbuntuToolkit/privates/ucscrollbarutils_p.h (+41/-0)
src/Ubuntu/UbuntuToolkit/ubuntutoolkitmodule.cpp (+4/-2)
tests/unit/visual/tst_scrollbar.13.qml (+72/-0)
To merge this branch: bzr merge lp://qastaging/~faenil/ubuntu-ui-toolkit/moreScrollbarOptimizations
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Cris Dywan Approve
Review via email: mp+301486@code.qastaging.launchpad.net

Commit message

More Scrollbar optimizations: 20% faster creation time

Description of the change

A bunch of Scrollbar optimizations, unit tests included.
- Don't use Qt.resolvedUrl for steppers icon path resolution
- Wait for the Flickable associated to the Scrollbar to be "completed"
  before triggering any logic that uses Flickable properties
- remove unused trough property in Scrollbar (fixes bug #1606451 )

NOTE: The second point relies on the PrivateScrollbarUtils component that I added to the Labs module. It is currently just used to get the QQuickItemPrivate::componentComplete (bool) of a QQuickItem, the Flickable in this case. That property, in fact, is not available on QML side, where you just get the Component.onCompleted signal.
The signal is not enough, because the user of the scrollbar API might assign a Flickable item which is already "complete", and in that case Scrollbar would never get the completion signal, thus never starting to read the properties of that Flickable.

BENCHMARK (I made sure the results for the other components were the same on both runs)

=== Before ===
PASS : tst_Performance::benchmark_GridOfComponents(list of Scrollbar 1.3)
RESULT : tst_Performance::benchmark_GridOfComponents():"list of Scrollbar 1.3":
     191 msecs per iteration (total: 191, iterations: 1)
PASS : tst_Performance::benchmark_GridOfComponents(list of ScrollView 1.3 with both Scrollbars)
RESULT : tst_Performance::benchmark_GridOfComponents():"list of ScrollView 1.3 with both Scrollbars":
     578 msecs per iteration (total: 578, iterations: 1)

=== After ===
PASS : tst_Performance::benchmark_GridOfComponents(list of Scrollbar 1.3)
RESULT : tst_Performance::benchmark_GridOfComponents():"list of Scrollbar 1.3":
     138 msecs per iteration (total: 138, iterations: 1)
PASS : tst_Performance::benchmark_GridOfComponents(list of ScrollView 1.3 with both Scrollbars)
RESULT : tst_Performance::benchmark_GridOfComponents():"list of ScrollView 1.3 with both Scrollbars":
     457 msecs per iteration (total: 457, iterations: 1)

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1947. By Andrea Bernabei

remove remaining temporary Scrollbar optim files

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1948. By Andrea Bernabei

add copyright header to ucscrollbarutils

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

There seems to be no test verifying that __initializedFlickable is null before it's completed. By extension calling scrollToBeginning, scrollToEnd and sliderPos in that case to see that they don't throw errors.

The new files src/Ubuntu/UbuntuToolkit/privates/ucscrollbarutils.{cpp,h} have no license headers.

Could you add a comment to the places where you dropped Qt.resolvedUrl? It's not obvious why you wouldn't use it - and without a comment it might get added again and we'd be losing the optimization.

review: Needs Fixing
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1949. By Andrea Bernabei

Scrollbar: add comment about the removal of Qt.resolvedUrl in the steppers path resolution

1950. By Andrea Bernabei

Scrollbar: hide scrollbar when no flickable is assigned to it. Unit tests included.

1951. By Andrea Bernabei

Labs: remove fake component. It was doubling every API which used QObject

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1952. By Andrea Bernabei

Labs module: run qmlplugindump with module 1.3

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1953. By Andrea Bernabei

merge staging

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1954. By Andrea Bernabei

ScrollbarUtils: rename header to _p.h following recent changes in SDK private classes policy

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

Niiiice. Let's get this in!

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches