{"action":"created","issue":{"url":"https://api.github.com/repos/daniel-nagy/md-data-table/issues/331","repository_url":"https://api.github.com/repos/daniel-nagy/md-data-table","labels_url":"https://api.github.com/repos/daniel-nagy/md-data-table/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/daniel-nagy/md-data-table/issues/331/comments","events_url":"https://api.github.com/repos/daniel-nagy/md-data-table/issues/331/events","html_url":"https://github.com/daniel-nagy/md-data-table/issues/331","id":142822873,"number":331,"title":"pageSelector causes long digest cycle for large datasets","user":{"login":"scancmdr","id":5082905,"avatar_url":"https://avatars.githubusercontent.com/u/5082905?v=3","gravatar_id":"","url":"https://api.github.com/users/scancmdr","html_url":"https://github.com/scancmdr","followers_url":"https://api.github.com/users/scancmdr/followers","following_url":"https://api.github.com/users/scancmdr/following{/other_user}","gists_url":"https://api.github.com/users/scancmdr/gists{/gist_id}","starred_url":"https://api.github.com/users/scancmdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scancmdr/subscriptions","organizations_url":"https://api.github.com/users/scancmdr/orgs","repos_url":"https://api.github.com/users/scancmdr/repos","events_url":"https://api.github.com/users/scancmdr/events{/privacy}","received_events_url":"https://api.github.com/users/scancmdr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-23T00:56:33Z","updated_at":"2016-03-23T13:52:57Z","closed_at":null,"body":"I have a large (server side) dataset on the order of 33,000 rows in my database. My DataService uses $http to query for slices of this dataset, usually 5 rows at a time.\r\n\r\nWhen I enable the `md-page-select` attribute on the `md-table-pagination` element the initial digest cycle takes over 10 seconds to run on my workstation.\r\n\r\nMy pagination element looks like this:\r\n`        <md-table-pagination md-limit=\"vm.query.limit\"\r\n                             md-total=\"{{vm.data.count}}\" \r\n                             md-page-select=\"true\" \r\n                             md-page=\"vm.query.page\" \r\n                             md-on-paginate=\"vm.onPaginate\" ></md-table-pagination>\r\n`\r\n\r\nI am able to reproduce this long digest cycle with this codepen:\r\n[http://codepen.io/scancmdr/pen/KzmMpd](http://codepen.io/scancmdr/pen/KzmMpd)\r\n\r\n\r\nNote that I'm artificially setting the dessert count to a very large number, the larger you set it the longer the digest takes. Try setting the dessert count to 30,000, then 50,000 and 100,000 which causes my browser to freeze up. I can replicate this across Firefox and Chrome.\r\n\r\nI wonder if there is a calculation that is being done that can be improved. This issue makes this data table component less useful for large server-side datasets.\r\n"},"comment":{"url":"https://api.github.com/repos/daniel-nagy/md-data-table/issues/comments/200353365","html_url":"https://github.com/daniel-nagy/md-data-table/issues/331#issuecomment-200353365","issue_url":"https://api.github.com/repos/daniel-nagy/md-data-table/issues/331","id":200353365,"user":{"login":"deniskozlov","id":5798040,"avatar_url":"https://avatars.githubusercontent.com/u/5798040?v=3","gravatar_id":"","url":"https://api.github.com/users/deniskozlov","html_url":"https://github.com/deniskozlov","followers_url":"https://api.github.com/users/deniskozlov/followers","following_url":"https://api.github.com/users/deniskozlov/following{/other_user}","gists_url":"https://api.github.com/users/deniskozlov/gists{/gist_id}","starred_url":"https://api.github.com/users/deniskozlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deniskozlov/subscriptions","organizations_url":"https://api.github.com/users/deniskozlov/orgs","repos_url":"https://api.github.com/users/deniskozlov/repos","events_url":"https://api.github.com/users/deniskozlov/events{/privacy}","received_events_url":"https://api.github.com/users/deniskozlov/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T13:52:57Z","updated_at":"2016-03-23T13:52:57Z","body":"Hi guys.\r\nProblem in md-select component (select page number) with large list.\r\nIn my case I set md-total field to 100k number and in the background md-select rendering md-option elements (~6k in my case) that's why it's so long is performed. \r\nI think need to use more primitive component for select or make virtualization for options list."}}