LabelVisual.isInsideOverlay() performance issue

Bug #1277227 reported by Michael Hall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Won't Fix
Critical
Unassigned

Bug Description

I ran my app (lp:ureadit) in the QtCreator analyzer and the following code accounted for 30% of the rendering time:

http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/modules/Ubuntu/Components/ListItems/LabelVisual.qml#L28

    // FIXME: very ugly hack to detect whether the list item is inside a Popover
    property bool overlay: isInsideOverlay(label)
    function isInsideOverlay(item) {
        if (!item.parent) return false;
        return item.parent.hasOwnProperty("pointerTarget") || label.isInsideOverlay(item.parent)
    }

Location Type Time in Percent Total Time Calls Mean Time Median Time Longest Time Shortest Time Details
LabelVisual.qml:27 Binding 8.10 % 125.849 ms 152 827.955 µs 894.083 µs 2.305 ms 466.326 µs property bool overlay: isInsideOverlay(label)

Location Time in Percent Total Time Self Time in Percent Self Time Details
LabelVisual.qml:28 158.82 % 885.349 ms 27.91 % 88.852 ms isInsideOverlay

Tags: performance
Revision history for this message
Michael Hall (mhall119) wrote :
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

Will be addressed when the theming feature is fully complete.

Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
milestone: none → upcoming-15.04
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → Critical
status: New → Confirmed
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
Revision history for this message
Zsombor Egri (zsombi) wrote :

Unfortunately there's no better way to detect in what context the label is used, is it in a popover or not. Perhaps a better solution would be to get subtheming to solve this. The new ListItem brings more flexibility and this and almost all components from the Ubuntu.Components.ListItems module will be deprecated, so maintaining this component would be impossible.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → Won't Fix
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.