Very long filter/render time
Very long filter/render time
vertisan
Posts: 7Questions: 2Answers: 0
I'm using DataTables with Laravel.
I have about 3000 records and when I want to search only one, filter process takes about 13 seconds what is too long.
I'm using server-side process, here is my config from DataTables:
var tabela = $('#accreditation-table').DataTable({
"ordering": false,
"bLengthChange": false,
"bAutoWidth": false,
pageLength: 50,
"bDeferRender": true,
"dom": '<i><t><p>',
"oLanguage": {
"sInfo": "Wpisów do wyświetlenia: _TOTAL_",
"sInfoFiltered": "",
"sInfoEmpty": "Brak wpisów do wyświetlenia"
},
processing: true,
serverSide: true,
ajax: '{!! route( 'accreditations-all' ) !!}',
columns: [
{ data: 'firstname', name: 'firstname' },
{ data: 'lastname', name: 'lastname' },
{ data: 'list', name: 'list' },
{ data: 'badge', name: 'badge' },
{ data: 'action', name: 'action', orderable: false, searchable: false }
]
});
It is possible to increase performance?
This discussion has been closed.
Replies
Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.
Information on how to create a test page, if you can't provide a link to your own page can be found here.
How long is the Ajax response tacking to return?
Thanks,
Allan
Ok, no problem.
Here is website: http://pam.esports-ground.pl/public/
Ajax response is around 10-14 seconds, I tried on 3 servers and preformance is same (difference in 1 second)
In debug console I added echo of request time (in miliseconds)
Yeah - its taking about 7 seconds for me. Interestingly there are two requests to your
all
path. One returns 50 records, the other returns 3000.Is that intentional?
Either way, the response time is really high. You'll need to look into whatever
all
is doing - probably an SQL query which is running slowly.EXPLAIN
might give you an indication of why it is running so slowly (a missing index perhaps).Allan