How to speed up DataTables?

By: John Lenehan | Asked: 06/27/2023
ForumsCategory: Code SnippetsHow to speed up DataTables?
John Lenehan asked 10 months ago
Hi I use Datatables (https://datatables.net/) to filter and sort entries on my views. Here is an example: This works great when I have up to 100 entries in a form. When I have more than that, it takes a long time for the Datatables UI to load because Datatables needs to wait until all of the entries have loaded. On slow laptops, this takes too long for the end user.

Paging the results in Formidable Forms does not fix the issue because if ten entries are displayed per page, then Databases can only filter those ten entries and ignore the rest. There are methods to defer the loading of entries using Datatables but I cannot get them to work with a Formidable Forms view. Has anyone found a solution to this problem? Has anyone else managed to use Datatables efficiently with around 1000+ entries? 

Thanks John    
Rob LeVineRob LeVine replied 10 months ago

Have you tried the Datatables feature "server-side processing"?

https://datatables.net/examples/data_sources/server_side

Also, I'm a little concerned that the table is struggling at 100+. That's way too small of a number of rows to experience slowness. How many columns do you have?

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right