Javascript stops in FF while rendering 10,000 rows

Javascript stops in FF while rendering 10,000 rows

shwetasabneshwetasabne Posts: 1Questions: 1Answers: 0

While rendering pagination of over 10000 rows, FF has an error :A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

Script: http://<base url>/js/jquery/jquery.min.js?version=4.6.1.0:6353

It takes forever to load in chrome as well.


Also tried Server side rendering, but I guess I am missing something

JS code :

$(document).ready(function() {
$('#example').dataTable( {
"ajax": {
"url": "/controller/method_name",
}
"processing":true,
"serverSide":true
} );
} );

PHP code

public function method_name {

$client_data = [['one', 'two'], ['three','four']];
echo json_encode($client_data);
}

Here my Json is returning a success with the right value, but I am getting data lenght can't be 0 error.

Any help/guidance is much appreciated.

Answers

  • DaharkDahark Posts: 28Questions: 1Answers: 0

    try clientsideprocessing and use deferRender

  • kqueekqueekqueekquee Posts: 40Questions: 1Answers: 0

    i have the same problem
    Un script sur cette page est peut-être occupé ou ne répond plus. Vous pouvez arrêter le script maintenant ou continuer pour voir si le script se terminera.
    what's ' clientsideprocessing '?

  • DaharkDahark Posts: 28Questions: 1Answers: 0

    In the above example there is "serverSide" : true. This means, the filtering and searching in data is not done on the client by javascript, but there is a Server backend that is handling those things.

    @kqueekquee:
    without any information about your setup, how you are retrieving your data, how your table is setup, I don't think anyone can help you with your problem. There are to many things that can cause the message and it must not be the Datatable that is the problem.

This discussion has been closed.