bootstrap-multiselect
bootstrap-multiselect copied to clipboard
Performance on "rebuild" and init of lots of options slow
I have a couple of selects with 500 or so options a piece. Building the lists initially takes a few seconds. I'm using a knockout custom databinding and have to rebuild the lists occasionally due to the select list options changing and performance is also slow here. Any advice for what I can do to improve perf? The plugin works great and is speedy with a couple dozen options, but once you grow beyond that, it seems to slow down.
I am experiencing the same issues with 3000 records, it takes ~6-11s to build the list initially.
Can you give a Fiddle or something similar? The runtime is, of course, a known problem, especially for many options. However, based on the examples in the documentation, runtime is still within acceptable bounds. So it would be interesting to see your setup. In the meanwhile I will experiment with some more examples ...
Hello @davidstutz
Here you can see an example. https://codepen.io/enavarrocu/pen/NAVLPB Almost 5000 elements.
There is a HUGE difference between Goggle Chrome and Safari, at least in MacOSX. In Chrome Canary there is a bit of improvement. Opera is also faster than Chrome. Firefox is not even capable of show the page.
Info: OS: OS X El Capitan 10.11.6 (15G31)
Safari: 9.1.2 (11601.7.7) Google Chrome: 52.0.2743.116 (64-bit) Google Chrome Canary: Version 54.0.2836.0 canary (64-bit) Opera: 39.0.2256.48 Firefox: 46.0.1
I know I am digging up an old thread, but I have recently implemented this package and, although happy with the package overall, I am also experiencing the painfully slow rendering performance with a large list.
In another forum a user modified the code to display a blank dropdown selector widget (or you could display "loading ...") and then build the list asynchronously, so that you could use the page immediately ... that would make for a great enhancement to this package.
Thanks. John
Still living with the pain here ... another option would be to allow "deferInitialization" until the dropdown is actually invoked ... since in our case more often than not the dropdown in question will not be used and will be left in the "all" position.