Does Datatables process entire data?

Does Datatables process entire data?

dausgdausg Posts: 1Questions: 1Answers: 0
edited November 2020 in Free community support

Im a big fan of datatable. Currently my project is using laravel framework. For displaying data i would use datatables. This object is great.. no doubt about it. But my concern after a years using datatables, does datatables process all of of my data (server-side datatables), then pickup the data from the dataset that intend for the single page view. Let say i have 20000 of data, when i using the code "return Datatables::of($data)->make(true);" then i use "dd($data)" function to see how much data was processed, it shown everything of all 20000 data rather than 10 record. Is this how it works in laravel?

TQ in advance for those who help me to clarify this. :smile:

Answers

  • colincolin Posts: 15,146Questions: 1Answers: 2,586
    edited December 2020

    I don't know anything about Laravel, but loading 20k records into a table would take time, whereas 10 records would be instant - so that would be one clue.

    Another big clue would be the network tab in the browser's developer's tools. serverSide uses ajax to request data for each draw. You should see only 10 records being requested for the initial draw, and likewise for every other draw afterwards,

    Colin

This discussion has been closed.