Multiple ag-grid tables causing browser to hang

Viewed 683

I am working on a dashboard and having multiple ag-grid tables. These tables have their own data-fetch mechanism (polling or data via web-sockets). Total having 7 tables out of which 4 rely on web-sockets and rest 3 on polling for data.

On receiving data normally we do :

  1. Add/remove data
  2. Flashing of cells
  3. Cell styling (based on data received )
  4. some custom checks

When we get frequent updates (say 500 events per minute on a page updating ag-grid data ) page becomes unresponsive and it starts showing sluggishness even scrolling inside the table becomes difficult. And if we have opened 3-4 tabs of the same dashboard CPU execution shoots up to 100% within 10 mins and White screen of death can be seen in inactive tabs.

When checked with the performance tab :

enter image description here

enter image description here

enter image description here

With the last image, it can be seen the idle time is very less and 80% is the script running time.

I have created the repo of our ag-grid configuration and what we do after we receive data : ag-grid load issue

[What I have already tried] :

  1. Immutable data source with web-workers (limitation I fall into is cannot use ag-grid functions like gridApi.getRowNode to get the nodes inside web-workers )

Any suggestions for improvement or some direction to look for performance will be helpful.

Thanks

P.S.:

  1. Above repo code is not executable (because we have some server configuration) but enough to give you an idea of how things are set-up and how it is executing.
  2. Moreover, we have an ag-grid widget component that is normally ng-repeat on the page with server configuration and tables are rendered on the page.
  3. We do not have such 10,000 rows(maximum rows in one of the table is up to 450 ) etc. but the operations are very frequent, like flashing of cells/ running cell style functions.
  4. what our tables look like : (one of the tables) enter image description here
0 Answers
Related