I have HTMl like this:
<form id="successorsForm" action="/app/details/Successors" method="post">
<fieldset>
<select class="form-control select2" data-live-search="true"
id="link0.discId" name="link[0].discId"
data-select2-id="link0.discId" tabindex="0" aria-hidden="false">
<option value="1" data-select2-id="1">Item 1</option>
<option value="2" data-select2-id="2">Item 2</option>
.....
.....
</select>
<select class="form-control select2" data-live-search="true"
id="link1.discId" name="link[1].discId"
data-select2-id="link1.discId" tabindex="0" aria-hidden="false">
<option value="1" data-select2-id="3">Item 1</option>
<option value="2" data-select2-id="4">Item 2</option>
......
......
</select>
</fieldset>
</form>
JS
$(".select2").select2({width: '100%', minimumInputLength: 3});
My page loads very slow because I have more than 4000 records, and page loads them all at once. Is there any other way, how can I solve this.