Making Jquery Datatables becoming not freezing when loading a bunch of data

Making Jquery Datatables becoming not freezing when loading a bunch of data

QiuQiu Posts: 1Questions: 0Answers: 0

Hi guys,
Jquery datatables is very good plug in and I really appreciate it. I did a little changes so it will not make the web browser freeze when it load the data from server. The scenario in my case is we use Ajax to load the data.

The explanation can be found here https://yudyx86.wordpress.com/2015/06/10/making-jquery-datatables-becoming-not-freezing-when-loading-a-bunch-of-data/

And one more thing is, I replace word 'Processing...' with loading.gif. Here how am I doing it https://yudyx86.wordpress.com/2015/06/12/changing-word-processing-with-gif-image-on-jquery-datatables/

Hi Allan, really appreciate if you can include those 2 things for official.

Thanks
Qiu

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    But when it’s loading many data returned from server, it makes the browser freezing and decrease user experience.

    It's a shame you didn't check in here before putting such misleading stuff in your blog.

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin

    Hi,

    Thanks for posting this. Looking at your code, it looks like you've added a number of interval timers to effectively shunt the "work" into the background - allowing the initial thread to run extremely quickly, but at the expense of the work still needing to be done, which it is at timed intervals.

    The downside of course is that this means the overall performance goes down, although potentially, from the end user's point of view, it could appear to go up!

    I'm long wanted to look at making parts of DataTables work with web-workers, and hopefully will one day (when enough end users are using browsers that support them!).

    Out of interest - how much data are you loading? Tables less than 50'000 rows should be fine client-side processing and not cause a browser to freeze. More than that, and you should use server-side processing really.

    Allan

This discussion has been closed.