First data load from server : how to load by chunks ?

First data load from server : how to load by chunks ?

RupRup Posts: 8Questions: 0Answers: 0
edited September 2013 in General
Hi Allan,
Back on a new DataTables project : Could you point me to a piece of code which will load data by chunks from the server, on first load only ?
With more than 1000 lines of data, I would like to load let's say 100 lines, then show the table and complete immediately with the other lines gettting loaded in the background.
This needs to be compatible with later filtering and/or pagination, which i DO NOT want to do on the server, which is too sluggish (mainly due to latency : it's salesforce). I will be using standard cookies state storage.

Can you help, please ?
Rup

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    If you want to do client-side processing, you have to load all data up front since the first thing DataTables does with the data is a sort - for which it obviously needs the full data set.

    You can load in chunks if you are using server-side processing, but I doubt SafeForce have DataTables server-side processing support built in!

    Another option to speed up the client-side is to enable deferred rendering - bDeferRender .

    Regards,
    Allan
  • RupRup Posts: 8Questions: 0Answers: 0
    Thanks for your advice.
    Does bDeferRender need to be used in conjunction with sAjaxSource, or can it be used differently ?

    Can I send you my code privately ?
    Thanks,
    Rup
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Typically you'd use an Ajax source, but you could also use it with local Javascript data. It can't be used with DOM sourced data, since the DOM elements have already been created.

    > Can I send you my code privately ?

    Yes, you can PM me here: http://datatables.net/forums/messages/add/allan . Or e-mail allan @ this domain.net.

    Allan
This discussion has been closed.