Skip to content

Commit d1c01d7

Browse files
author
Henrik jJaven
committed
DooHTML non-keyed
1 parent b08a338 commit d1c01d7

File tree

1 file changed

+0
-73
lines changed

1 file changed

+0
-73
lines changed

frameworks/non-keyed/doohtml/js/Main.class.js

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
'use strict';
2-
3-
4-
const startTime = {}
5-
let tot= []
6-
const start = function(name) {
7-
// document.querySelector('#time').blur()
8-
9-
tot.push(new Date().getTime())
10-
if (!startTime[name]) {
11-
startTime[name] = [ new Date().getTime()]
12-
}
13-
};
14-
const stop = function(name) {
15-
if (startTime[name]) {
16-
startTime[name].push(new Date().getTime())
17-
console.log('DooHTML', name, 'took:', startTime[name][1] - startTime[name][0]);
18-
if (tot.length === 2) {
19-
console.log('DooHTML Tot:', startTime[name][1] - tot[0])
20-
tot = []
21-
}
22-
startTime[name] = undefined
23-
}
24-
};
25-
26-
272
const _random = ((max) => {
283
return Math.round(Math.random()*1000)%max;
294
})
@@ -97,20 +72,6 @@ Doo.define(
9772
this.renderTable()
9873
}
9974

100-
run(e) {
101-
start('buildData')
102-
this.data.rows = this.buildData()
103-
stop('buildData')
104-
start('run')
105-
this.tbody.textContent = ''
106-
this.renderTable()
107-
e.target.blur()
108-
109-
stop('run')
110-
}
111-
112-
113-
11475
add() {
11576
let startRow = this.data.rows.length
11677
this.data.rows = this.data.rows.concat(this.buildData())
@@ -122,40 +83,6 @@ Doo.define(
12283
this.tbody.textContent = ''
12384
this.renderTable()
12485
}
125-
runLots(e) {
126-
start('buildData')
127-
this.data.rows = this.buildData(10000)
128-
stop('buildData')
129-
start('runLots')
130-
this.tbody.textContent = ''
131-
this.renderTable()
132-
e.target.blur()
133-
134-
stop('runLots')
135-
}
136-
137-
run(e) {
138-
start('buildData')
139-
this.data.rows = this.buildData()
140-
stop('buildData')
141-
start('run')
142-
this.tbody.textContent = ''
143-
this.renderTable()
144-
e.target.blur()
145-
146-
stop('run')
147-
}
148-
149-
add(e) {
150-
start('append')
151-
let startRow = this.data.rows.length
152-
this.data.rows = this.data.rows.concat(this.buildData())
153-
stop('append')
154-
start('runAppend')
155-
this.appendData(this.tbody, startRow, 1000)
156-
e.target.blur()
157-
stop('runAppend')
158-
}
15986

16087
update() {
16188
let tr = this.tbody.querySelectorAll('tr')

0 commit comments

Comments
 (0)