server side processing

server side processing

gayatrigayatri Posts: 8Questions: 5Answers: 0

hello,
i'm using datatables with sails.js and mongodb, i facing difficulty to load large ammount of records at a time, i dnt knw mysql and php... i can any one give any advice how to sort out this issue for me....

Answers

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

    i facing difficulty to load large ammount of records

    What do you mean?

  • gayatrigayatri Posts: 8Questions: 5Answers: 0

    means am fetching around 3lakhs of data from database at a time, and while showing on web browser my browser prompt me to stop script... how can i show the total amount of data on the browser?

  • john_ljohn_l Posts: 45Questions: 0Answers: 12

    At what point does the browser prompt you to stop the script? It shouldn't be during the data download as that should be happening asynchronously. If it is happening during the table initialization, then there are a few things you can try:
    1) Download the data in JSON format (if you are not already doing that) - that will avoid Datatables having to parse all the data from HTML.
    2) Use deferred rendering, so Datatables will only have to render a small part of the entire dataset.

    If the prompt is happening elsewhere in your code, then try to split your code up into sections, each of which will run, and then call the next section via a short setTimeout call - that lets the browser know the script isn't hung or in an infinite loop, and so it won't prompt the user.

This discussion has been closed.