I have a selectize list with +7000 items.
The page gets really slow and noticeable laggy (angular).
What's the best approach to deal with this issue?
this is the list options code:
vm.selectize_clientes = { options: [] };
vm.selectize_clientes.options = vm.selectize_cliente_data;
vm.selectize_clientes_config = {
create: false,
maxItems: 1,
maxOptions: 999999999,
placeholder: '',
valueField: 'email',
labelField: 'nome',
searchField: ['nome', 'email'],
render: {
option: function (clientes, escape) {
return '<div class="option">' +
'<span class="title">' + escape(clientes.nome) + ' - ' + escape(clientes.login) + '</span>' +
'</div>';
},
item: function (clientes, escape) {
return '<div class="item">' + escape(clientes.nome) + ' - ' + escape(clientes.login) + '</div>';
}
}
};
<div class="uk-margin-bottom" id="clientesDiv">
<label for="cliente">Cliente</label>
<input ng-model="vm.mensagem.userKey" type="text" config="vm.selectize_clientes_config" options="vm.selectize_clientes.options"
name="cliente" id="cliente" selectize />
</div>
Have you checked out #1084 #1105? Looks like it's the same issue. Can you profile your situation and report your findings there?
Selectize is loadign the list quite fast. The problem is that typing in any other inputs in the page, it gets laggy and slow.
Ps: I'm using selectize with angular.
@thiagosoeiro I confirm it. Is there some improvements?
@matte00 don't seems to be any improvement until now but after reducing maxOptions we can see the difference.
Same issue here after few years. Any fix on this? Even on the other issues there's no fix to this. I had to ajaxify everything but still freeze the page.
Yes, ajax or websockets is the only way to solve this problem. Do not load 7,000 list
I have to let the user choose from all the italian province, and there are over 8.000 names that I can't reduce for several obvious reasons. So it's a render/browser/memory issue... is that for sure? Or someone did some tricks to get something lighter?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days