Model slowness causes significant UI hang when reordering the scopes list

Bug #1646947 reported by Josh Arenson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-scopes-shell (Ubuntu)
New
Undecided
Josh Arenson

Bug Description

== Background ==
I recently implemented an autoscrolling mechanism (lp:~josharenson/unity8/autoscroller-alternative) for the ScopesList to resolve lp:1575319 This branch, I believe, is exposing an issue that has likely always been present.

== Steps to Reproduce ==
1. Install the autosceoller branch mentioned above on a mobile device. For the sake of this bug, you can probably just copy the changed qml files.
2. Install enough scopes so that the list is longer than the display; about 20 should work.
3. Open the scopes list, press and hold to enter 'edit' mode, and drag the bottom most scope to the top of the list (which should automatically scroll upwards).
4. Release the scope

Expected behavior: scope drops to new position in list
Actual behavior: UI hangs for several seconds

== Evidence ==
There are several possible culprits for this issue, however I've ruled out two big ones.
Qt - Since the issue isn't present in the mock, its unlikely a Qt bug
Unity8 - I have a qt profiler trace from the unity8-dash that shows no activity at all during the hang. Thus, I believe the issue is somewhere in the scopes or categories model. I've attached the trace for reference.

Related branches

Revision history for this message
Josh Arenson (josharenson) wrote :
Revision history for this message
Josh Arenson (josharenson) wrote :

Some stuff worth noting

[2016-12-05:10:34:33.448] JOSH: Entering moveFavoriteTo
[2016-12-05:10:34:33.498] JOSH: Exiting moveFavoriteTo after 49 ms
[2016-12-05:10:34:33.510] JOSH: Entering favoritesChanged*
[2016-12-05:10:34:33.510] JOSH: Entering processFavoriteScopes*
[2016-12-05:10:34:33.511] JOSH: Exiting processFavoriteScopes after 0 ms

[2016-12-05:10:34:35.528] JOSH: Exiting favoritesChanged after 2018 ms

Revision history for this message
Josh Arenson (josharenson) wrote :

Seems to be caused by the last for loop in OverviewResultsModel::setResults, which is being executed 131071 times.... Working on a patch

Changed in unity-scopes-shell (Ubuntu):
assignee: nobody → Josh Arenson (josharenson)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.