Ubuntu Pastebin

Paste from faenil at Wed, 11 Nov 2015 14:51:55 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.ListItems 1.3 as Lol


Column {
    width: 800
    height: 600

    Repeater {
        model: 5000
        ListItem {
            height: layout.height + divider.height
            ListItemLayout {
                id: layout
                Item { SlotsLayout.position: SlotsLayout.Leading; width: units.gu(2) }
                Item { SlotsLayout.position: SlotsLayout.Trailing; width: units.gu(2) }
                Item { SlotsLayout.position: SlotsLayout.Trailing; width: units.gu(2) }
                title.text: "test"
                subtitle.text: "label"
            }
        }
    }
}












import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.ListItems 1.3 as Lol

Column {
    width: 800
    height: 600

    Repeater {
        model: 5000
        Item {
            implicitHeight: units.gu(7)
            anchors.left: parent.left
            anchors.right: parent.right
            ListItemLayout {
                id: layout
                anchors.top: parent.top
                Item { SlotsLayout.position: SlotsLayout.Leading; width: units.gu(2) }
                Item { SlotsLayout.position: SlotsLayout.Trailing; width: units.gu(2) }
                Item { SlotsLayout.position: SlotsLayout.Trailing; width: units.gu(2) }
                title.text: "test"
                subtitle.text: "label"
            }
            Lol.ThinDivider {
                anchors.top: layout.bottom
            }
        }
    }
}








tst_performance: PASS   : tst_Performance::benchmark_GridOfComponents(with listitem)
tst_performance: RESULT : tst_Performance::benchmark_GridOfComponents():"with listitem":
tst_performance:      2,068 msecs per iteration (total: 2,068, iterations: 1)
tst_performance: PASS   : tst_Performance::benchmark_GridOfComponents(with Item + ThinDivider)
tst_performance: RESULT : tst_Performance::benchmark_GridOfComponents():"with Item + ThinDivider":
tst_performance:      2,654 msecs per iteration (total: 2,654, iterations: 1)
Download as text