{"action":"created","issue":{"url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/434","labels_url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/434/labels{/name}","comments_url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/434/comments","events_url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/434/events","html_url":"https://github.com/nostalgiaz/bootstrap-switch/issues/434","id":59539656,"number":434,"title":"performance issues with many controls","user":{"login":"briansol","id":5598104,"avatar_url":"https://avatars.githubusercontent.com/u/5598104?v=3","gravatar_id":"","url":"https://api.github.com/users/briansol","html_url":"https://github.com/briansol","followers_url":"https://api.github.com/users/briansol/followers","following_url":"https://api.github.com/users/briansol/following{/other_user}","gists_url":"https://api.github.com/users/briansol/gists{/gist_id}","starred_url":"https://api.github.com/users/briansol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briansol/subscriptions","organizations_url":"https://api.github.com/users/briansol/orgs","repos_url":"https://api.github.com/users/briansol/repos","events_url":"https://api.github.com/users/briansol/events{/privacy}","received_events_url":"https://api.github.com/users/briansol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-02T20:02:49Z","updated_at":"2015-04-18T00:58:21Z","closed_at":null,"body":"I have built a module with check boxes and added this switch on top of it.  There are about 5 columns and 30 rows in my settings table, resulting in about 150 instances.\r\n\r\nThis unit comes in from a DOM-append with a .load() call.\r\nNormal HTML returns:\r\nGET\t200\ttext/html\t15.87 KB\t1.24 s\r\n\r\nadding in:\r\n```javascript\r\n<script>\r\n    $(function(){ \r\n         $('.bss input[type=\"checkbox\"], .bss input[type=\"radio\"]').bootstrapSwitch({\r\n                size:'mini', \r\n                onSwitchChange: function(e,state) { \r\n                     updatePerms(e, this.id, state, '/updateperms/');\r\n                }\r\n            });\r\n     });\r\n</script>\r\n```\r\n\r\nwith the class on\r\n    `<tbody class=\"bss\">`\r\n\r\n to the bottom of the script results in:\r\nGET\t200\ttext/html\t16.11 KB\t1.42 s\r\n\r\nwhich is barely longer.\r\n\r\nYet, the render/paint time is at least 5 seconds longer which results in a 'hanging' page appearance where everything like clicking/etc is locked out.\r\n\r\nIs there a better way to do this?  Should I broaden or change the target of my selector?  \r\n\r\nHas anyone else run into latency issues?   I've tested in both ie11 and Chrome and they are both (poorly) about the same.\r\n"},"comment":{"url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/comments/94107831","html_url":"https://github.com/nostalgiaz/bootstrap-switch/issues/434#issuecomment-94107831","issue_url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/434","id":94107831,"user":{"login":"mariofischer","id":166842,"avatar_url":"https://avatars.githubusercontent.com/u/166842?v=3","gravatar_id":"","url":"https://api.github.com/users/mariofischer","html_url":"https://github.com/mariofischer","followers_url":"https://api.github.com/users/mariofischer/followers","following_url":"https://api.github.com/users/mariofischer/following{/other_user}","gists_url":"https://api.github.com/users/mariofischer/gists{/gist_id}","starred_url":"https://api.github.com/users/mariofischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariofischer/subscriptions","organizations_url":"https://api.github.com/users/mariofischer/orgs","repos_url":"https://api.github.com/users/mariofischer/repos","events_url":"https://api.github.com/users/mariofischer/events{/privacy}","received_events_url":"https://api.github.com/users/mariofischer/received_events","type":"User","site_admin":false},"created_at":"2015-04-18T00:58:21Z","updated_at":"2015-04-18T00:58:21Z","body":"I switched to this alternative: https://github.com/minhur/bootstrap-toggle/ - works flawlessly for me."}}