Speeding up Datatables — is a 9 second load time reasonable?

Speeding up Datatables — is a 9 second load time reasonable?

east1999east1999 Posts: 31Questions: 11Answers: 0

Hi guys,

I would like to avoid another generic "how to speed up DT" question, so I'll be as specific as possible.

My DT has ~5000 rows and takes 9 seconds to load with a basic broadband connection. That's mostly because of the 5mb JSON file behind it.

I find this fast in my own typical use, but when I've shown it others, they became impatient, even if later load times (searching) are negligible.

Is there a good way to make the initial load time faster?

I read a few threads about server-side processing and they seem to involve SQL, which is an extra layer of complication for me. All I think I need in that situation is simply a PHP that processes the ajax calls and passes the data from JSON (also protecting it in the process from being saved in the clientes — bonus points).

What is everyone else doing?

Thanks

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 6,084Questions: 21Answers: 1,347
    edited January 12 Answer ✓

    This FAQ discusses the options to help improve the speed to display the table. A quick thing to try is deferRender. If most of the delay is due to network latency then deferRender may not help much which leaves the option of ServerSide processing.

    With serverSide processing your server script is now responsible querying your data and applying the sorting and searching to return only the rows for the current page being displayed. Your script will need to support the protocol described here:
    https://datatables.net/manual/server-side

    Kevin

  • east1999east1999 Posts: 31Questions: 11Answers: 0

    Thank you. I do have deferRender on.

    My loading times go from 10 seconds to a whole minute, depending on connection speed.

    Correct me if I'm wrong: using SSP, my script will serve as middleman, only returning the first 50 rows in the first load, or as many as the subsequent searches return?

Sign In or Register to comment.