Wednesday, April 15, 2020

Use jQuery dataTable with large number of data, 10,000 rows

1) Realistically what is the upper limit of the number of rows to sent to the View page, without hurting the performance? My data is pretty small, each row normally has anywhere from 1-10 fields, each field normally only has a few chars;
That depends on your needs. To me, if I believe that a table will exceed 100 / 200 records, I use server side processing. Lower than this value, I think it doesn't worth the effort.
2) I read this: http://legacy.datatables.net/usage/server-side - can someone provide an example in COntroller action, how do I group the data and send to view, after I pull the correct data from the DB? Also an example of how to display them in the view;
Check this article - it may help you:
http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part
3) Currently the app uses jQuery datatable in many places, but none has server-side processing. Only for 1 or 2 cases, the number of records could grow over time to 10,000 or 25,000 etc. So - in this case, what is the best way to approach this? Do I specify a "number" that if the returned data exceeds this number of rows, then use server-side processing? or change it from now?
In this case, I would suggest use server side processing.

No comments:

Post a Comment

How to register multiple implementations of the same interface in Asp.Net Core?

 Problem: I have services that are derived from the same interface. public interface IService { } public class ServiceA : IService { ...