loading 20 records it needs 9 secs and it seems too long, and...

loading 20 records it needs 9 secs and it seems too long, and...

peterpen2019apeterpen2019a Posts: 1Questions: 1Answers: 0

Link to test case: sorry those are some confidential data...

Debugger code (debug.datatables.net): https://i.imgur.com/ICpsUSx.png

Error messages shown: no error messages

Description of problem:
DataTable v2.0.8 options used:
// "responsive": true,
"searching": true,
// "paging": false,
"lengthChange": false,
"pageLength": 100,
"ordering": true,
"order": [[ 10, "desc" ]],
"info": false,
"scrollY": "400px",
"scrollX": true,
"scrollCollapse": true,
"processing": true,
"serverSide": true,
"ajax": "htstudents/list.php"

PHP version: 8.1.28 and MySQL 10.6.18-MariaDB-cll-lve database used:
loaded 20 records -> 9 secs
loaded 10 records -> 4 secs     
loaded 5 records -> 2 secs

loading 20 records it needs 9 secs and it seems too long, and how come loading 20 records it needs 9 secs while 5 records needs only 2 secs please?

Thank you for your help.

Answers

  • kthorngrenkthorngren Posts: 21,188Questions: 26Answers: 4,925

    loaded 20 records -> 9 secs

    Yes that is excessively long. Your solution will need to be profiled to determine where the delay is. The delay may be at the server with the DB query or a delay between the Ajax request and response. Based on your code snippet there doesn't seem to be any Datatables customizations that might cause a delay.

    If you need further help with debugging the slow response then please post a link to your page or test case replicating the issue. Or you can contact Allan by clicking the Ask a Private Question button to arrange for him to help debug directly.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

Sign In or Register to comment.