-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbenchmark.php
69 lines (62 loc) · 1.74 KB
/
benchmark.php
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
<!DOCTYPE html>
<html>
<head>
<title>tm benchmark</title>
<link rel='stylesheet' href='dist/tablemodify.css' />
<link rel='stylesheet' href='dist/themes/default.css' />
<script src='dist/tablemodify.min.js'></script>
<script>
window.addEventListener('DOMContentLoaded', function(){
var tm = new Tablemodify('#myTable', {
modules: {
fixed: {
fixHeader:true
},
/*filter: {
},*/
//sorter: {},
/*
columnStyles: {
all: {
'min-width': '100px'//,
//'width':'auto'
},
0: {
'max-width':'100px'
}
}
*/
}
});
});
</script>
<style>
.tm-container {
height:500px;
}
</style>
</head>
<body>
<table id='myTable'>
<?php
$rowCount = 50000;
$colCount = 10;
$text = '<thead><tr>';
for ($i = 0; $i < $colCount; $i++) {
$text .= "<td>kopf $i</td>";
}
$text .= '</tr></thead><tbody>';
for ($i = 0; $i < $rowCount; $i++) {
$text .= '<tr>';
for ($j = 0; $j < $colCount; $j++) {
$rand = rand(0, 2*$rowCount);
$text .= "<td>$rand</td>";
}
$text .= '</tr>';
}
$text .= '</tbody>';
echo $text;
?>
</table>
</body>
</html>