JSFiddle - React, Tailwind, and code Playground

by Julian

HTML

<select id="xxx">
    <option value="-1">-1</option>
</select>

JavaScript

// Utility function to display log output
function logOutput(output) {
    $('body').append("<div><b>&gt</b> " + output + "</div>");
}

var startDate = new Date();

var content = ""; // "<select id='xxx'>";
for (var i=0; i<30000; i++) {
    content += "<option value='" + i + "'>" + i + "</option>\n";
}
// content += "</select>";

logOutput("content created, " + (new Date() - startDate));

$('#xxx').append(content)
    
logOutput("added, " + (new Date() - startDate));