Any way to speed up the table draw or show a spinner during sorting/ordering?

Any way to speed up the table draw or show a spinner during sorting/ordering?

SturmSturm Posts: 4Questions: 3Answers: 1

First, thank you to all of the devs who have made this awesome jQuery plug-in. You have made an incredible life-saver for me and my company! Now, on to my question.

It seems that the table takes an inordinately long amount of time being drawn. Whenever I change dates in an adjacent datepicker, it is meant to retrieve the data for that date from the database and display it. This usually takes about 4 to 5 seconds, and that's with everything local (the database and the site are on my local PC for testing). Thankfully, I am able to use a spinner to help the user understand that the app is busy, and to please be patient (even though the spinner gif, oddly, doesn't seem to animate). Thus, the time delay on redrawing the table isn't a huge deal thanks to that.

Where it does become an issue, however, is when clicking on an orderable column header. This appears to trigger a redraw of the entire table (again, entirely expected), which takes the aforementioned 4 to 5 seconds. In this case, however, the "busy" spinner never shows. I have the code to show (and hide) the spinner in the .on('processing.dt') function of the DataTable, but it seems to only appear when a new date is selected from the datepicker. I would very much like it to appear also when the table is re-ordered by clicking on a column header to let the user know to be patient.

I am sorry that I do not have a live copy of this for anyone to see, as I am still new to the game and don't know of any place that will host this Laravel test site (plus the database upon which the DataTable depends) temporarily and for free. Instead, I do have a debugger link, which may or may not help. Please let me know if there's any other information that you need to help me discover a way to either drastically shorten draw times or get the "busy" spinner to appear properly.

Sign In or Register to comment.