JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › DropDownList › DropDownList takes long time to initialize › Reply To: DropDownList takes long time to initialize
Hi,
– It is slow approach to do document.body.appendChild multiple times. The correct approach is to create a document fragment, append all items to it and then append the document fragment.
– The second approach with setting dataSource is better one. However, you should set the “virtualized” property to true, if you plan to use this component with many items. If all items will be with equal height, you can speed up the things by setting the “itemHeight” property, too. By doing that, height layout calculations will not be performed by the UI Component.
Best Regards,
Peter
Smart UI Team
https://www.htmlelements.com/