Defer render not working as expected

Defer render not working as expected

octavoctav Posts: 18Questions: 0Answers: 0
edited September 2013 in General
Hi! I'm using datatables with server side processing and I wanted to use deferred rendering to increase performance. But defered rendering brings no performance increase whatsoever. Is there something I'm missing from the picture ?

This is my initialization code:

oTable = $('#solutionsTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bSort": false,
"oLanguage": {
"sSearch": "Search all columns:"
},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": '@Url.Action("AsyncGetUserData")',
"bDeferRender": true,
"aoColumns": [
//User
{ "mData": function(source, type, val){
var returnString = "Name: " +"" + source.userName + "" +
"
Type: " + "" + source.roleName + "
" +
"Status: " + "" + source.isActive + "";
return returnString;
}},
//Activity
{ "mData": function(source, type, val){
var returnString = "Logins Number: " + source.loginsNum +
"
Last Login: " + source.lastLogin;
return returnString;
}},
//Contact
{ "mData": function(source, type, val){
var returnString = "First Name: " + source.firstName +
"
Last Name: " + source.lastName +
"
Email: " + source.email +
"
Phone: " + source.phone;
return returnString;
}},
//Work
{ "mData": function(source, type, val){
var returnString = "Company: " + source.company +
"
Job title: " + source.job;
return returnString;
}},
//Address
{ "mData": function(source, type, val){
var returnString = "Country: " + source.countryName +
"
City: " + source.city +
"
Street: " + source.street +
"
Postcode: " + source.postcode;
return returnString;
}},
//Options
{ "mData": function(source, type, val){
var editUrl = '@Url.Action("Account", "CMS")' + '?userId=' + source.userID;

var returnString = "Edit
" +
"Delete";
return returnString;
}}
]
}).fnSetFilteringDelay();

Is there something I should be doing in the controller action ?

Thanks in advance

Replies

  • octavoctav Posts: 18Questions: 0Answers: 0
    PS: I'm using a table with 1000 records as reference. takes about 2 sec to render table. Server side processing takes 1 sec.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Deferred rendering has no effect on a server-side processing table since it only has the rows that need to be drawn. Can you link to a test case showing the problem as noted in the forum rules please.

    Allan
  • octavoctav Posts: 18Questions: 0Answers: 0
    I cannot post a link since this change has not yet entered production. It's all on my local machine (localhost)
  • octavoctav Posts: 18Questions: 0Answers: 0
    It seems that only occasionally this happens, so my supervisor doesn't consider this a problem
This discussion has been closed.