Skip to content

Commit 0128314

Browse files
committed
Improve performance for adding 10K rows in keyed implementation
1 parent 141a8dd commit 0128314

File tree

1 file changed

+1
-1
lines changed
  • frameworks/keyed/vanillajs-3/src

1 file changed

+1
-1
lines changed

frameworks/keyed/vanillajs-3/src/Main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const colours = ["red", "yellow", "blue", "green", "pink", "brown", "purple", "b
33
const nouns = ["table", "chair", "house", "bbq", "desk", "car", "pony", "cookie", "sandwich", "burger", "pizza", "mouse", "keyboard"];
44
const [l1, l2, l3] = [adjectives.length, colours.length, nouns.length];
55

6-
const nTemplates = (n) => 10, tbody = document.getElementsByTagName('tbody')[0];
6+
const nTemplates = (n) => n / 100, tbody = document.getElementsByTagName('tbody')[0];
77
let data = [], index = 1, i, lbl, selected;
88

99
function create(n = 1000) { if (tbody.children.length) clear(); append(n); }

0 commit comments

Comments
 (0)