A speed issue I believe with DataTables
A speed issue I believe with DataTables
jamesjw007
Posts: 35Questions: 0Answers: 0
Here is the code I am using:
var oTable = jQuery('#dyntable').dataTable({
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"fnServerParams": function (aoData) {
var sReportType = (jQuery('#report_type').val() == "") ? "Downline" : jQuery('#report_type').val();
aoData.push({
"name": "report_type",
"value": sReportType
});
aoData.push({
"name": "rankid",
"value": (jQuery('#rank_id').val() || []).join(",")
});
},
"sAjaxSource": "ajax/message_center_compose.asp",
"aoColumnDefs": [
{ "sWidth": "20px", "aTargets": [0] },
{ "sWidth": "60px", "aTargets": [1, 4, 5, 6] },
{ "bSortable": false, "aTargets": [0] },
{ "bSearchable": false, "aTargets": [0, 4] },
{ "sClass": "text-align-center", "aTargets": [0, 1, 5, 6] },
{ "sClass": "text-align-right", "aTargets": [4] }
],
"fnDrawCallback": function (oSettings) {
convertCheckbox();
doNotSendList(oTable, aDoNotSend);
verifyChecked(oTable, aDoNotSend, nTr);
},
"fnServerData": fnDataTablesPipeline,
"bDeferRender": true
});
I allow them to select out filters. The initial report loads bringing back 55 results. It does this in about 1 seconds. When I select filters and add in ranks i want to filter this by it takes around 13-30 seconds.
The stored procedure itself runs in under a second when using the same criteria..
Any idea where I can start looking to see where the speed bump is?
var oTable = jQuery('#dyntable').dataTable({
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"fnServerParams": function (aoData) {
var sReportType = (jQuery('#report_type').val() == "") ? "Downline" : jQuery('#report_type').val();
aoData.push({
"name": "report_type",
"value": sReportType
});
aoData.push({
"name": "rankid",
"value": (jQuery('#rank_id').val() || []).join(",")
});
},
"sAjaxSource": "ajax/message_center_compose.asp",
"aoColumnDefs": [
{ "sWidth": "20px", "aTargets": [0] },
{ "sWidth": "60px", "aTargets": [1, 4, 5, 6] },
{ "bSortable": false, "aTargets": [0] },
{ "bSearchable": false, "aTargets": [0, 4] },
{ "sClass": "text-align-center", "aTargets": [0, 1, 5, 6] },
{ "sClass": "text-align-right", "aTargets": [4] }
],
"fnDrawCallback": function (oSettings) {
convertCheckbox();
doNotSendList(oTable, aDoNotSend);
verifyChecked(oTable, aDoNotSend, nTr);
},
"fnServerData": fnDataTablesPipeline,
"bDeferRender": true
});
I allow them to select out filters. The initial report loads bringing back 55 results. It does this in about 1 seconds. When I select filters and add in ranks i want to filter this by it takes around 13-30 seconds.
The stored procedure itself runs in under a second when using the same criteria..
Any idea where I can start looking to see where the speed bump is?
This discussion has been closed.
Replies
Allan
It states 22.41 seconds is spent in (program) with the second request with filters.
Cannot for the life of me figure out why the second option is so much slower.
Allan