server side processing
server side processing
gayatri
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....
This discussion has been closed.
Answers
What do you mean?
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?
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.