-
Notifications
You must be signed in to change notification settings - Fork 13
/
performance.html
65 lines (56 loc) · 1.28 KB
/
performance.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Stress tests</title>
<link rel="stylesheet" href="https://get.mavo.io/mavo.css" />
<link rel="stylesheet" href="style.css" />
<script src="https://get.mavo.io/mavo.js"></script>
<script src="mavotest.js"></script>
</head>
<body>
<h1>Stress tests</h1>
<section mv-app mv-storage="#data">
<h1>Long collection</h1>
<table class="reftest">
<tr title="Number of items">
<td>[count(collection)]</td>
<td>1,000</td>
</tr>
<tr title="Inner items">
<td>[count(prop1)]</td>
<td>2,000</td>
</tr>
<tr title="All prop2 values">
<td>[prop2]</td>
<td>
<script>print(Array(1001).join(", 2").slice(2))</script>
</td>
</tr>
<!-- tr>td*2 -->
</table>
<div property="collection" mv-multiple>
[$index]
<div property="prop1" mv-multiple>prop1</div>
<div property="prop2">prop2</div>
<div property="prop3">prop3</div>
<div property="empty">empty</div>
[prop2]
</div>
</section>
<details>
<summary>Data</summary>
<script>
var o = {collection: []};
for (var i=0; i<1000; i++) {
o.collection.push({
prop1: ["foo", "bar"],
prop2: 2,
prop3: true
});
}
document.write("<pre id=data>" + JSON.stringify(o, null, "\t") + "</pre>");
</script>
</details>
</body>
</html>