Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1010
Updating table every second causes performance lag
posted

Hi,

I have an igTreeGrid where a subset of the rows have a timer, ticking down to 0. The way I have implemented, I have called

setInterval(tickExpirations, 1000)

Inside the tickExpirations function, I essentially compare the current system time with an expiration time, take the diff, create a string ("00:02:00"), and update the igTreeGrid using updating feature. Then I call commit. This is being done for all rows that need updates to their timer.

However, this is causing the page to be slow or unresponsive if there are many timers.

Can you please advise if there is an alternate way to update the grid that is not as expensive? I've uploaded screenshot of Google Chrome profiler.

Thanks!

Parents
  • 29417
    Offline posted

    Hello C R,  

    Thank you for posting in our forum. 

    Could you provide some additional information like:

    1. How many records and columns does your TreeGrid contain?

    2. How many rows on average are updated each second?

     In general what happens when you update a row is that the underlying data record in the data source is updated and the specific row is re-rendered based on the new values.

    If you’re updating all of the rows or a big portion of them then the re-rendering of the rows might take some time.

    If that’s the case you can enable Virtualization or the Paging feature in order to limit the number of records rendered at a time.

    For more details and tips on improving the performance you can refer to:

    http://www.igniteui.com/help/igtreegrid-overview#performance

    If paging or virtualization are enabled, only the currently visible rows will be rendered. If you update a row that is outside of the current data view no immediate re-rendering will occur. The row will be rendered only once you scroll it into view and will reflect the applied change.

     I hope you’ll find this information useful. I’m looking forward to your reply. 

    Best Regards,

    Maya Kirova

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

     

     

Reply Children