Scope::settings() is too slow

Bug #1567429 reported by Albert Astals Cid
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-scopes-shell (Ubuntu)
Fix Released
Undecided
Marcus Tomlinson

Bug Description

Evaluating

settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false

in GenericScopeView.qml takes around 300 ms when running on the phone, which basically feels like an eternity if you're trying to use the phone to scroll, change to another scope, etc

If this needs heavy calculation this should be either pre-calculated and cached or calculated in a separate thread and then signalled with a signal.

Related branches

Revision history for this message
Paweł Stołowski (stolowski) wrote :

From a quick look the problem is most likely caused by Scope::settings() getter, which calls update_child_scopes() every time settings model is accessed by the getter, and this involves IPC with m_scopeProxy->child_scopes() call, which is a blocking call.

Changed in unity-scopes-shell (Ubuntu):
status: New → Confirmed
Changed in unity-scopes-shell (Ubuntu):
assignee: nobody → Marcus Tomlinson (marcustomlinson)
Changed in unity-scopes-shell (Ubuntu):
status: Confirmed → In Progress
Michał Sawicz (saviq)
Changed in unity-scopes-shell (Ubuntu):
status: In Progress → Fix Released
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.