Deferred Rendering

Deferred Rendering

deathtospamdeathtospam Posts: 10Questions: 0Answers: 0
edited June 2011 in DataTables 1.8
How does deferred rendering work? Does the page make multiple calls to the page defined by "sAjaxSource", as it needs to render each page? Or does it pull it all down in one call and then store the info somewhere?

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    If you are using client-side processing then it will pull it all as one. If you are using server-side processing then there is a call to the server for each page to be displayed when the scrolling stops. This is exactly the same regardless of if you are using deferred rendering or not.

    There is more information about each type of data source here: http://datatables.net/usage/#data_sources

    Allan
  • deathtospamdeathtospam Posts: 10Questions: 0Answers: 0
    Thank you for the link. But just to be clear: if "bServerSide" is set to true, the server page will be responsible for taking all of the DataTable parameters -- iDisplayStart, iDisplayLength, iSortCol_[n], sSortDir_[n], bSearchable_[n], sSearch_[n], iSortingCols, sSearch, sEcho, and any others I'm not remembering -- and returning all of the records on the specific page of data you're viewing, sorted and filtered in the precise manner described by DataTables. Is that accurate?
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    That is exactly correct yes.

    Docs: http://datatables.net/usage/server-side
    Example: http://datatables.net/release-datatables/examples/data_sources/server_side.html

    The idea is to have an SQL engine (or whatever) do all the hard work of sorting data etc, since this is what they are designed and optimised for. This way the table can show millions of records, page at a time.

    Allan
This discussion has been closed.