I have the need to import 1000s of records into a datatable. This process currently takes a large amount of time to complete. I'm using the fnAddData method to add a record. Is there a better way to import this many records?
I am adding records after the page has been rendered. The problem I'm running into is that when using the fnAddData method it performs the sorting and filtering. I can add the records by adding the rows to the DOM. The problem I run into is that when I run fnDraw it doesn't redraw the table with the new records.
How are you calling fnAddData - if you do it by passing 'false' as the second argument, DataTables will not redraw the table for every new row - this is good for speed. Then when that is complete, call fnDraw() which will do the sort and everything else for you. Hopefully that will give a speed boost.
How many 1000s of rows are you dealing with? Might sever-side processing be possible?
Replies
you should probably take a look at http://datatables.net/usage/ again
the easiest usage, and probably th best way to get started is to follow the dom example
when you have lots of rows, or want more control, take a look at server side processing
How many 1000s of rows are you dealing with? Might sever-side processing be possible?
Allan