{"action":"created","issue":{"url":"https://api.github.com/repos/fooplugins/FooTable/issues/298","labels_url":"https://api.github.com/repos/fooplugins/FooTable/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/fooplugins/FooTable/issues/298/comments","events_url":"https://api.github.com/repos/fooplugins/FooTable/issues/298/events","html_url":"https://github.com/fooplugins/FooTable/issues/298","id":50008288,"number":298,"title":"Performance enhancement suggestion","user":{"login":"ClubWebware","id":6040484,"avatar_url":"https://avatars.githubusercontent.com/u/6040484?v=3","gravatar_id":"","url":"https://api.github.com/users/ClubWebware","html_url":"https://github.com/ClubWebware","followers_url":"https://api.github.com/users/ClubWebware/followers","following_url":"https://api.github.com/users/ClubWebware/following{/other_user}","gists_url":"https://api.github.com/users/ClubWebware/gists{/gist_id}","starred_url":"https://api.github.com/users/ClubWebware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClubWebware/subscriptions","organizations_url":"https://api.github.com/users/ClubWebware/orgs","repos_url":"https://api.github.com/users/ClubWebware/repos","events_url":"https://api.github.com/users/ClubWebware/events{/privacy}","received_events_url":"https://api.github.com/users/ClubWebware/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-11-25T10:29:35Z","updated_at":"2015-07-13T18:33:25Z","closed_at":null,"body":"We have a table where the THEAD consists of 2 TR-elements, where the 1st TR has some pagination controls en the 2nd TR has the column headers.\r\n\r\nOne of the pagination controls in the 1st TR is a select list with the total number of pages.\r\nWhen the dataset is really large, the number of pages may be large as well. And that turned out to be a  real problem for FooTable.\r\n\r\nWe had a table where the pages select list in the 1st TR had over 4.000 option elements, and it took FooTable an incredibale amount of time to handle the table. \r\nThe entire webpage became unresponsive (hanging) while FooTable was trying to do what it is supposed to do.\r\n\r\nWe managed to solve this issue with a small change to the FooTable code:\r\n\r\nIn the ft.addRowToggle function, we changed:\r\n\r\n                    var selector = '> tbody > tr:not(.' + cls.detail + ',.' + cls.disabled + ') > td:nth-child(' + (parseInt(col.index, 10) + 1) + '),' +\r\n\t\t\t\t\t\t\t\t\t\t\t'> tbody > tr:not(.' + cls.detail + ',.' + cls.disabled + ') > th:nth-child(' + (parseInt(col.index, 10) + 1) + ')';\r\n                    $table.find(selector).not('.' + cls.detailCell).prepend($(opt.toggleHTMLElement).addClass(cls.toggle));\r\n\r\n\r\ninto:\r\n\r\n                    var _oTBody = $table.find('> tbody');\r\n                    var selector = '> tr:not(.' + cls.detail + ',.' + cls.disabled + ') > td:nth-child(' + (parseInt(col.index, 10) + 1) + '),' +\r\n\t\t\t\t\t\t\t\t\t\t\t'> tr:not(.' + cls.detail + ',.' + cls.disabled + ') > th:nth-child(' + (parseInt(col.index, 10) + 1) + ')';\r\n                    _oTBody.find(selector).not('.' + cls.detailCell).prepend($(opt.toggleHTMLElement).addClass(cls.toggle));\r\n\r\n\r\nAnd it's working like a charm now.\r\n\r\nMaybe someone can apply this code change to the base product?"},"comment":{"url":"https://api.github.com/repos/fooplugins/FooTable/issues/comments/121016976","html_url":"https://github.com/fooplugins/FooTable/issues/298#issuecomment-121016976","issue_url":"https://api.github.com/repos/fooplugins/FooTable/issues/298","id":121016976,"user":{"login":"SiteSplat","id":6224707,"avatar_url":"https://avatars.githubusercontent.com/u/6224707?v=3","gravatar_id":"","url":"https://api.github.com/users/SiteSplat","html_url":"https://github.com/SiteSplat","followers_url":"https://api.github.com/users/SiteSplat/followers","following_url":"https://api.github.com/users/SiteSplat/following{/other_user}","gists_url":"https://api.github.com/users/SiteSplat/gists{/gist_id}","starred_url":"https://api.github.com/users/SiteSplat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiteSplat/subscriptions","organizations_url":"https://api.github.com/users/SiteSplat/orgs","repos_url":"https://api.github.com/users/SiteSplat/repos","events_url":"https://api.github.com/users/SiteSplat/events{/privacy}","received_events_url":"https://api.github.com/users/SiteSplat/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T18:33:25Z","updated_at":"2015-07-13T18:33:25Z","body":"@bradvin  I didnt know there was v3. I cant find the link on github."}}