3

I am using datatables in my jquery application.Now I want to switch from datatables to slickgrid, because datatables take more time to render if more number of rows are there.So wanted to use some other jquery pluins for tables with rich performance.

Do any one have an examples where conversion from jquery datatables to slickgrid is done.Please help.

VividD
  • 10,456
  • 6
  • 64
  • 111
user1138464
  • 39
  • 1
  • 8
  • 2
    I've used slickgrid (didn't convert jquery datatables) but I ended up switching to using Kendo UI's grid instead. I found the performance to be comparable plus the documentation was much much better than slickgrid's. – kinakuta May 11 '12 at 05:01
  • Thank for your quick response.Do Kendo UI have similar functionality as datatables? – user1138464 May 11 '12 at 05:13
  • 1
    I have always found DataTables to be "performance rich", but it does take a bit to wrap your head around the myriad options it offers. There are options to use "deferred" rendering (a big performance boost in some cases) and of course you should offload to the server if you have that many rows. I do really like what Kendo UI is doing, too, though! – Greg Pettit May 11 '12 at 05:15
  • Check out Kendo UI's grid examples if you want to compare (I couldn't speak to a direct DataTables comparison.) http://demos.kendoui.com/web/grid/index.html – kinakuta May 11 '12 at 05:19
  • I am using datatables inside an menu. i.e when an menu is clicked a tables will be displayed which uses datatables.This table contains 6 columns of which two columns displays spikline graphs.If the tables has more number of rows say around 300, it takes about 10sec or more to open the menu which irritates the user.So i want to shift from datatables to other jquery table ui. – user1138464 May 11 '12 at 05:24
  • I bet rendering 600 sparklines is what kills the performance, not the grid choice :) That said, SlickGrid would force you to write it in a way where this won't be an issue, though there's nothing that prevents you from doing the same with any other grid. – Tin May 11 '12 at 05:27
  • If I render 600 sparklines in slickGrid will improve the performance?? – user1138464 May 11 '12 at 05:41
  • That's not what I said. SlickGrid won't let you do that. Instead, you would have to use the API it provides, which is designed to force you to write scalable code. See http://mleibman.github.com/SlickGrid/examples/example10-async-post-render.html. – Tin May 11 '12 at 05:46
  • I don't think DataTables is the bottleneck here, as mentioned. But just in case: if your data source is Ajax or JS (not server-side processing, and not pre-rendered in the table), have you tried the bDeferRender option? 300 rows is a trivial amount for DataTables to be able to handle, so I'm still guessing configuration/usage or an outside factor (600 sparklines?). As shown in the example on Tin's page, sparklines take time to render! You can always show the table and then render the Sparklines in the callback. I posit that design rather than tools is the bottlneck here. – Greg Pettit May 11 '12 at 05:47
  • Ok.Can any one mention different options used to improve the performance of the datatables. – user1138464 May 11 '12 at 06:02
  • The above comments are a good start. In general, don't make the browser do unnecessary work or, at the very least, do it only when it becomes necessary. – Tin May 11 '12 at 06:04
  • Can I use any other pulgin instead of sparkline to improve the performence. – user1138464 May 11 '12 at 06:13
  • 1
    The incredibly rich comments yet lack of actual "answers" hints to me that this question is probably too broad or under-researched. The knee-jerk reaction was "the tables code is slow" and looking for a replacement without actually testing. Did you try simply taking the sparklines out? What if we're all simply *wrong* and the sparklines don't make a difference? (though I'm sure it will... just for the sake of argument...) I'm going to vote to close, not because you don't deserve answers (you do!) but because you need to come back with different specific questions. – Greg Pettit May 11 '12 at 06:23
  • Thank for your patience answering. – user1138464 May 11 '12 at 06:32
  • 1
    I Removed the sparkline and found that the performance is much much better. – user1138464 May 11 '12 at 07:00

1 Answers1

4

I had the same issue with DataTables in conjunction with Sparklines. I found that by rendering the sparklines as the rows became visible within the fnDrawCallback callback, it performed much better than if I rendered all the sparklines up front.