question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pageSelector causes long digest cycle for large datasets

See original GitHub issue

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.

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:open
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
daniel-nagycommented, Mar 27, 2016

Hi all, I just released v0.10.0 with virtualization for the page dropdown.

2reactions
daniel-nagycommented, Mar 23, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to avoid digest cycle delay from two-way binding
Angularjs when two way data binding is triggered? In an AngularJS application I have a parent directive and a child directive. · parentDirective....
Read more >
Total US Debt to GDP Ratio – Deleveraging Analysis (2021)
a 75-100 year long term debt cycle characterized by large swings in the ratio of total debt to GDP. Completing the long-term debt...
Read more >
AngularJS - 6 Tips to Optimize the Digest Cycle - Data Analytics
This article represents tips on making optimal usage of digest cycle which slowers the Angular app. Please feel free to comment/suggest if I ......
Read more >
NetSuite Applications Suite - Translations Tab User Interface
Page Selector — Lets you select the next page to continue to view your content, if you have more than 50 pieces of...
Read more >
UCLA Electronic Theses and Dissertations - eScholarship.org
traditional roles of the middleware such as tag data filtering, sorting, ... shipments of large quantities of tagged items would cause a surge...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found