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 Reply Children
No Data