-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performence #85
Comments
Initial findings shows that $foo.multiselect('rebuild') is much faster than $foo('refresh') , perhaps for "select all" we can just toggle the select options and then rebuild the dropdown to make it faster? |
Yes with large option lists we are running in performance issues anyway. But before tackling this problem we have to make the plugin a bit more modular. Caused by a lot contributions (do not misunderstand me, contributing is really great!) the complexity has risen to a point at which extending the plugin has become really difficult. So I am currently trying to get a modular structure, and I would propose discussing the efficency with the new structure. |
Sounds like a legit and reasonable approach! Thanks for your update! |
probably we'll use this component for a new web-app, but probably we'll have large lists. what's the planning for the new structure? thanks for reply! |
Without using the "select all" option performance should not be a problem up to 1000 options I think (500 options is still running relatively smooth, see the 4. demo here: http://davidstutz.github.io/bootstrap-multiselect/). But as you can try yourself the select all option with 500 items sometimes takes up to 10 seconds to complete. This is really bad and you can make suggestions how to improve performance on this issue. Maybe you will find a better solution, I appreciate any kind of pull request. I started just expermineting a bit (I dont know if the beta is still in the current release), but due to my exams I will not be able to continue this at the moment. I plan to continue it around september, maybe october, but I do not know how much time I am able to invest. In addition there is still a bunch of work to do for the current version before starting with a "clean" approach. |
Hi David, thanx for the reply! |
Hi David |
There are some performence issues with bootstrap-multiselect when you have a lot of options.
The refresh method for example which needs to match options with li in an inefficient way but simple way.
I dont have any concrete solution at this late sunday hour but lets try to discuss some possible solutions.
One way could be to build up internal data structures so that we dont need to check the dom for every item all the time which is time consuming.
We could also look at how chosen or select2 handles performence.
My first thought is that we could use the index passed to .each because there should be the same amount of option as li elements, except for those added by multiselect (filtering), if we can use the index we can make quick initial performence boosts ($('option', this.select)[index])
Thanks for creating bootstrap-multiselect!
The text was updated successfully, but these errors were encountered: