pageSelector causes long digest cycle for large datasets
See original GitHub issueI 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.
When 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.
My pagination element looks like this:
<md-table-pagination md-limit="vm.query.limit" md-total="{{vm.data.count}}" md-page-select="true" md-page="vm.query.page" md-on-paginate="vm.onPaginate" ></md-table-pagination>
I am able to reproduce this long digest cycle with this codepen: http://codepen.io/scancmdr/pen/KzmMpd
Note 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.
I 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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Hi all, I just released
v0.10.0
with virtualization for the page dropdown.The
md-select
component is known to be the source of this issue. I believe I am going to allow the developer to specify a step as @scancmdr suggested. If you have thousands of records I would avoid using the page select for now.