Jquery DataTable loading takes long time
Jquery DataTable loading takes long time
elenora
Posts: 23Questions: 10Answers: 0
Hi. I'm implementing asp.net core 3.1 project and I have a Jquery DataTable in my razor view. After adding just two columns of Data and a column of checkbox, it take 4 sec long to load all the DataTable and its data. I appreciate if anyone suggests me how I can make the time of its load shorter.
This discussion has been closed.
Answers
This section of the FAQ should help, it discusses various techniques to improve performance,
Cheers,
Colin
Thank you for your reply. As I understand, due to having a lots of records displaying in DataTable, I should use some code like the following for my DataTable. $('#example').dataTable( {
"serverSide": true,
"ajax": "xhr.php"
} );
However, I'm passing data from controller to view by a model that was read from SQL server DataBase. So how can I use ajax to load the data into DataTable.
For server side processing, enable
serverSide
. The protocol is discussed here. Also see examples here.Cheers,
Colin