Loading tie is very slow

Loading tie is very slow

THEJASVIKMTHEJASVIKM Posts: 3Questions: 1Answers: 0

Hi team
Actually, I have more than 20000 rows of data to display in a datatable, and it takes about 2 to 5 minutes to load that data. Is there a way to fix this?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    That's very slow. Do you know where the slowness occurs? Is it on the server-side script, and it is then rendered quickly by DataTables? Or is the server quick, and the DataTables client slow? Try running your server-script on the sever itself and see how fast that completes.

    You could also consider server-side processing. For server-side processing, enable serverSide. The protocol is discussed here. Also see examples here. If you download the DataTables repo, there are examples of the server-side scripts here,

    Colin

  • THEJASVIKMTHEJASVIKM Posts: 3Questions: 1Answers: 0
    edited May 2023

    Hi Colin
    we not using server side script . like velocity object in java using for loop we are adding rows
    example:
    foreach($test1 in $test)
    <tr>
    <td>$test1.add1 </td>
    <td>$test1.add1 </td>
    <td>$test1.add1 </td>
    <td> $test1.add1</td>
    <td>$test1.add1 </td>
    </tr>

    end

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Can you link to a test case showing the issue please? There is no way 20k rows should take 5 minutes to load unless the data for each row is massive (like a gigabyte). I'd like to see the network tab to show what part of the system is running so slow.

    You will likely see an improvement in performance if you use Ajax with deferRender like in this example and mentioned in the speed FAQ.

    Allan

Sign In or Register to comment.