Will bDeferRender help render a large data set faster if paging is not used?
Will bDeferRender help render a large data set faster if paging is not used?
Hi folks,
I have a relatively large data set (150 rows with 25 columns) loaded into the datatables and I noticed that it takes browser some 2 seconds to render/display it even though server side code executed in 0.2 seconds. I was reading this post http://82.113.152.82/forums/discussion/18233/slow-rendering-of-10000-rows-/p1 which mention using bDeferRender to speed up the rendering process by allowing DataTables to defer the creation of the table elements for each row until they are needed for a draw.
So my question is does this also work if datatables paging is not enabled? I don't want my user to page through X many pages, I want all records available right away via a scroll. How does bDeferRender feature know which rows are "needed for draw"?
Here is the demo of the problem: http://screencast.com/t/sPQByOOk9oJ. As you can see the repsonse took 0.3 seconds but the DOM loading took over 2 seconds.
Also if I was to use aaData and aoColumns to define my data how would I define the footer rows data in that case? Is there a way to indicate that the data row should go to the footer row?
I have a relatively large data set (150 rows with 25 columns) loaded into the datatables and I noticed that it takes browser some 2 seconds to render/display it even though server side code executed in 0.2 seconds. I was reading this post http://82.113.152.82/forums/discussion/18233/slow-rendering-of-10000-rows-/p1 which mention using bDeferRender to speed up the rendering process by allowing DataTables to defer the creation of the table elements for each row until they are needed for a draw.
So my question is does this also work if datatables paging is not enabled? I don't want my user to page through X many pages, I want all records available right away via a scroll. How does bDeferRender feature know which rows are "needed for draw"?
Here is the demo of the problem: http://screencast.com/t/sPQByOOk9oJ. As you can see the repsonse took 0.3 seconds but the DOM loading took over 2 seconds.
Also if I was to use aaData and aoColumns to define my data how would I define the footer rows data in that case? Is there a way to indicate that the data row should go to the footer row?
This discussion has been closed.
Replies
However, if you are using scrolling, then use Scroller ( http://datatables.net/extras/scroller ) which can use the built-in pagination and bDeferRender .
Allan
with regards to the scroller example: is it important that the data is fetched via ajax for it to work? The way I have it setup (I'm using .NET MVC) I have a partial view which is rendered in the table container. Essentially instead of fetching JSON data only and then binding that data to the table I am actually generating the entire table html on server side and sending it down the pipe. I know it's more expensive that way but I have header cells which contain HTML and I don't want to have to write HTML as data values inside JSON. MVC views allow me to avoid that scenario - use them as a template in a way.
@Marko76, did you ever find a solution to your problem? I have some code doing the exact same thing you described (entire html table generated in a partial) and it is very slow with 1000 rows/15 columns. I was thinking to switch over to server side processing but I would prefer not to spend the time refactoring.