-
Notifications
You must be signed in to change notification settings - Fork 20
DataTables to load large set data in daru view table
I have implemented server-side processing (using ajax option in DataTables) in DataTables for more than 50000 data rows and client-side processing below that. This is done because in server-side processing, searching is not done properly. This feature enables the user to load millions of rows in the table. To use datatables:
- Formulate the data
- Provide options (you can even provide HTML options in
options
, do see the examples below in both the apps). - Create a Daru::View::Table object of adapter
:datatables
. - Call
div
with this object.
To understand this concept more check out the rails examples in demo_daru-view app and in daru-data_tables app.
Some tested data: https://github.com/Shekharrajak/datatables-sample-daru
Live demo : https://shekharrajak.github.io/datatables-sample-daru/
When you run this links: https://shekharrajak.github.io/datatables-sample-daru/server_side/static.html , it will just load the entire data into the browser so it takes too much time and your browser crashes.
Same amount of data is loading in this link: https://shekharrajak.github.io/datatables-sample-daru/server_side/server.html and it is pretty fast to load and shows in data according to the scrolling.
In both links, I am loading 16042100 number of rows.