-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
performance degradation with over 20 selects on website #582
Comments
Have you also checked -> #578 |
@KpjComp - checked ;) but didn't understand the fix - what should be put where ;) |
Hi @rangerek In unit "bootstrap-select.js" at about line 509 you should see something like ->
Basically move this code to about line 977, so you should then have something like ->
Basically this makes the event for touchstart.dropdown only get initialized once, while the code was in the init procedure this was getting executed for every SELECT you put on your page. IOW: if you had 100 SELECT's on the page, there would be 100 touchstart.dropdown events getting executed, not only would this cause slowdown, but memory consumption/leak too. And in chrome on my machine would end up killing the page. |
unfortunatelly it didn't work |
Seems to work for me, it's a bit slow but does not crash.. As an optimization idea if you set the display of the body to none while you init, and then reset to block when done I get it down to about 7 seconds. So you could try that.. |
sorry but this is still not good for me for a webpage that does purely nothing :( - then for such number of selects i will look for other solution - pity |
@KpjComp Could you make a PR out of this? |
I just got a similar problem: 14 seconds to load my page with 1.6.3. |
Likewise with 1.6.3 and 2.0.0-beta1 - had to revert to 1.6.2 to get it to work in IE8 without the dreaded "A script on this page is causing Internet Explorer to run slowly" alert. |
Please try v1.7.0-rc2 and report back. |
…appointments#582) Utilizes native Javascript DOM properties to improve render speed. Moves liHeight function inside setSize so it only runs when the select is opened rather than running it for every select on init.
when inserting a lot of selects on one page webpage freezes with watchdog alerting about jQuery execution too long
I have already checked #291 and #447 but they are not relevant here
Here is the sample of the code that is repeated >100 times on the webpage (with different parameters):
The text was updated successfully, but these errors were encountered: