How to increase the loading time of the datatable with large number of entries like 15000?
How to increase the loading time of the datatable with large number of entries like 15000?

I have a datatable with 15000 entries that is provided from the Groovy backend and I am using the following options to render the datatable
deferRender: true,
scrollCollapse: true,
scroller: {
loadingIndicator: true,
},
bFilter: true, //disable searchbar
info: true, //disable "showing x results"
paging: true, //show all
colReorder: true,
dom: 'lBfrtip',
"lengthMenu": [ 10, 25, 50, 100 ],
buttons: [
'copyHtml5',
'excelHtml5',
'csvHtml5',
'pdfHtml5'
],
But still the page takes around one 1 min to load the datatable, how can I reduce the time of loading the datatable
Also, I am using pagination, so is there a way to load only first 10 entries and then load others?
This discussion has been closed.
Answers
This FAQ should get you started. Please post any questions.
Kevin
I am using Groovy to provide the data to be shown in the datatable
Is there a way to speed the datatable on the browser without much server side interaction as there will be too processing overhead involved
If you are Ajax loading and have
deferRender
enabled, then that's as fast as you'll get the client-side to run. Make sure you have gzip enabled on your server and optimise the database for retrieval. It would be worth checking the network panel in your browser to see how long the download of the data takes.Beyond that, we'd need a link to the page to be able to look at it and offer any further help.
Allan
Currently, it is taking 40seconds~1min to load the data shown in Network Panel
The database is optimized and is in MySQL
As the data is internal I won't be able to provide the link
The number of rows we are trying to load is 15k
Enabling gzip would help in what way?
Can someone please help me if there is any other way to increase the speed.
I'm not sure we can help increase the download speed. It would be worth looking in the network panel to see if it is the download that is taking the time, or if its the processing on the server-side that is taking the time. If the latter, then you'll need to look at optimising whatever script you are using then. If its the download speed - the only thing that would help is a faster connection (assuming you have gzip enabled already).
This is why DataTables has a server-side processing mode. It can't magically get the data from the server faster than the network connection
.
Allan