Best Practices for Improving DataTables Performance with Large Datasets

Best Practices for Improving DataTables Performance with Large Datasets

minecraftminecraft Posts: 1Questions: 0Answers: 0

I’m learning how to work with DataTables and I’m interested in improving performance when displaying large amounts of data.

For smaller datasets, DataTables works really well, but I’m wondering what approaches experienced developers recommend when a table contains thousands or even hundreds of thousands of records.

A few questions I have:

Is server-side processing usually the best approach for very large datasets?
What are the most important settings for improving table performance?
Are there particular extensions or features that should be avoided with large datasets?
How do you handle searching, filtering, and sorting efficiently?
What are your preferred approaches for optimizing Ajax requests?

Replies

  • allanallan Posts: 65,870Questions: 1Answers: 10,958 Site admin

    Once you hit tens of thousands of rows, it is usually time to start thinking about server-side processing. There isn't a golden rule of when to switch over, as it depends on your data complexity - how large the values in the data points are, how many data points per row, etc.

    To my mind, the thing to watch is the size of the JSON file (or HTML if just reading a plain table). Depending on your target network conditions / customer, you might decide that at 1MB, you need to switch to server-side processing. Or if it is an internal network, you might decide that 10MB is acceptable.

    Once you switch to SSP, you can have the server handle millions of rows of data, no problem.

    The key thing to avoid when using SSP is having all rows shown! That would render the partial data load redundant, since it would load everything! So do not disable paging and don't offer an option to show all records. If you must use scrolling, use the Scroller extension to "fake" the scrolling of the full data set.

    Allan

Sign In or Register to comment.