list perf: use documentFragment to add all rows to table in one operation
This commit is contained in:
parent
cbd87c85c8
commit
0309dbb00e
|
@ -430,10 +430,11 @@ export class ListView extends View {
|
||||||
nodes = nodes.reverse();
|
nodes = nodes.reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var fragment = document.createDocumentFragment();
|
||||||
for (let i = 0; i < nodes.length; i += 1) {
|
for (let i = 0; i < nodes.length; i += 1) {
|
||||||
const row = this.renderRow(nodes[i]);
|
const row = this.renderRow(nodes[i]);
|
||||||
|
fragment.appendChild(row);
|
||||||
this.tbody.appendChild(row);
|
|
||||||
}
|
}
|
||||||
|
this.tbody.appendChild(fragment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue