Monday, February 8, 2016

Data Table Vs List

Data tables are the best data source for many controls in .net environment.  But manipulating data with data tables i.e., when considering large amount of data its a wind up process.  The process will be very slow when we compare the same manipulation with List.

For an analysis I iterated 1500 records with some login with data tables and list.  The analysis report is as below

With Data Table

1500 Rows Data Table - Processing Time - 2 minutes 44 seconds

With List

1500 Items List - Processing Time - 32 seconds

Conclusion:
For manipulating large amount of data, its better to choose List rather than Data Table.