JSFiddle - React, Tailwind, and code Playground

by marifrahman

HTML

<select id="selct_1"></select>
<select id="selct_2"></select>
<select id="selct_3"></select>
<select id="selct_4"></select>
<select id="selct_5"></select>
<select id="selct_6"></select>
<select id="selct_7"></select>
<select id="selct_8"></select>
<select id="selct_9"></select>

JavaScript

var start = new Date().getTime();

var optList = [];
for (i = 0; i < 5000; i++) {
    optList.push("<option value ='" + i + "' >Options - " + i + "</option>");
}
var opt = optList.join("");
for (j = 1; j < 10; j++) {
    $("selct_" + j).update(opt);
}

var end = new Date().getTime();
var diff = end - start;
alert("Execution time: " + diff + "Ms");