Speed up server side render when print all records.

Speed up server side render when print all records.

van9petrykvan9petryk Posts: 7Questions: 3Answers: 0
edited May 2022 in Free community support

I need to print all records when server side is on.
I found this advice https://datatables.net/forums/discussion/44994/how-to-print-all-records-when-serverside-is-true
It works, but very slow. The results from server return in 3 seconds, but than it takes 25 seconds to draw all records and export in pdf.
There are 2000 records.
Maybe the problem is in many render function, that table have.
But it also the problem, that datatable is calling its twice:
- first time, on draw
- second time, on print.

Can I some way speed up print?

Answers

  • colincolin Posts: 15,202Questions: 1Answers: 2,592

    For 2k records, you wouldn't need server-side - the client would be fine dealing with that. If the table is likely to grow, then yep, that would be an issue, but client-side processing is fine for roughly 20k records or so.

    Colin

  • van9petrykvan9petryk Posts: 7Questions: 3Answers: 0

    the API call take max 2 seconds for getting all records, not too long, but can increase with time. So, I don't want change serverSide to clientSide.
    The entity is very large horizontally, around 40 fields and it is main problem. Maybe, I can hide all columns, before making ajax call to get all records? Or some other solution.

  • colincolin Posts: 15,202Questions: 1Answers: 2,592

    I see. There are some other threads that may help, here and here for example. This is something we do intend to tackle, but there won't be an 'official' solution in the short-term unfortunately,

    Colin

Sign In or Register to comment.