Advice on streaming with DataTables

Advice on streaming with DataTables

davegudavegu Posts: 10Questions: 3Answers: 0

Hi All
Firstly a quick disclaimer!!
I am not a coder in any shape or form. Every thing that I have done on the website I am building has been achieved by copying code that I have found on the web and on this site.

I am very happy with the way that my website is turning out, especially the look that I get using DataTables:

https://www.flickr.com/photos/daveguy/15643286001/

My issue now is, because my mysql database grows every time an aircraft flies into range, the loading time for some of my pages is taking too long.

My question is, is there anyway that I can get the first 50 or so records to load immediately and the rest to stream in the background? Without that the site could end up being too cumbersome and the wait for the pages to load be too long for most visitors.

If there is a way, I would be grateful if you could explain how in the simplest terms possible as I am at an age where it gets more and more difficult to take on technical info.

Thanks in hope
Dave

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Answer ✓

    One option might be to use server-side processing.

    The other option is simply to load the initial 50 records as required and then use an Ajax call to get more data and rows.add() to add more rows to the table as your Ajax requests are retrieved.

    Allan

  • davegudavegu Posts: 10Questions: 3Answers: 0

    Hi Allan, sorry for the delay in answering.
    Your second suggestion has worked for me
    Thank You
    Dave

This discussion has been closed.