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 :
- Add/remove data
- Flashing of cells
- Cell styling (based on data received )
- 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 :
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] :
- Immutable data source with web-workers (limitation I fall into is cannot use ag-grid functions like
gridApi.getRowNodeto get the nodes inside web-workers )
Any suggestions for improvement or some direction to look for performance will be helpful.
Thanks
P.S.:
- 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.
- Moreover, we have an ag-grid widget component that is normally
ng-repeaton the page with server configuration and tables are rendered on the page. - 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.
- what our tables look like : (one of the tables)



