We are facing serious performance issues while loading ag-Grid data ( Approx 2000+ records ) in browser. We are loading all the data from DB in single API call and displaying all records without pagination. There is not much of issue in getting data from DB as it will take limited time. It's the browser which crashes when data is huge.
Now, Stakeholders have asked for pagination to improve both performance and user experience.
But, I'm wondering if we should choose client side pagination where I can simply enable pagination attribute of Ag-grid in angular OR server side pagination where I need to make DB call every time to load data for next page. I'm worried about number of DB calls might increase because of this.
Which one is better ? I'm already seeing improvement in loading when I just enable pagination attribute of angular.
Please note that data will keep growing in future. Probably 20,000 , 30,000 , 50,000 records n so on. Consider exponential growth in data. I read somewhere that if data is huge then we should go for server side pagination. Is it true ?