#100904
Tr12
Member

I tried to set dropDown.dataSource to an array of objects rather than creating new smart-list-items. This improves performance a bit (it only needs about 300 ms), but it’s still relatively slow.


let perfStart = performance.now();
let dropDown = new window.Smart.DropDownList();
let datas = [];
for (let i = 0; i < 120; i++)
datas.push({
label: "Item " + i,
value: i
});
dropDown.dataSource = datas;
document.body.appendChild(dropDown);
let time = performance.now() - perfStart;
alert("Time: " + Math.floor(time));