Click on one of the above buttons to load data

parsing time 0ms
sorting time 0ms
re-attach2DOM time 0ms

Sorting JS Tables

Click on the header to sort by that column. As the number of rows increase, building and rendering the table/DOM takes an increasingly disproportionate time. For 10,000 rows, the actual sorting is a tiny fraction of the time it takes to rebuild the DOM and system rendering. Number of columns also plays a factor. 10,000 rows with 2 columns takes 50% of the time of 11 columns. Render timing is not include(haven't figured it out yet!) but if interested, you can run the performace tool in developer tools(Ctrl+Shift + I in most browsers). A pretty good indication of overall time for the process to complete is simply the time it takes to load the initial file as rendering the table is the biggest time consumer, not the sorting. Beyond the scope of this demo, but for very large tables, the best strategy will be some type of pagination.