clarketm / TableExport

The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
https://tableexport.travismclarke.com/
Apache License 2.0
888 stars 289 forks source link

Export large table - Slow Result. - how to improve the download speed. #130

Open danielrpp opened 6 years ago

danielrpp commented 6 years ago

Hi, I have detected a bug, on line 908 of js tableexport.js, you must replace

_nodesArray (context.rows) .map (function (val, ir)

by:

for (var i = 0; i <_nodesArray (context. rows) .length; i ++) (function (val, ir)

this helps considerably in the speed.

KMcCracken commented 6 years ago

I had a table with approx. 2,300 rows. I didn't had the patience to let it finish loading. After your fix, it took around 30 seconds. Thank you!

danielrpp commented 6 years ago

@KMcCracken I like it to know that I have helped you!

1rlaw1 commented 6 years ago

Thank you for this. The change fixed an extremely slow load for me as well.

JoeMoon5 commented 5 years ago

Excellent catch. I have a table of ~14K rows and this caused the export to change from "Page Unresponsive" to barely 10 seconds. Thanks!