"Export to CSV" locking up
"Export to CSV" locking up
![guillochon](https://secure.gravatar.com/avatar/997fc38bc24c4bd66b521a3e38fcb98c/?default=https%3A%2F%2Fvanillicon.com%2F997fc38bc24c4bd66b521a3e38fcb98c_200.png&rating=g&size=120)
I'm currently seeing an issue where the "Export to CSV" button is causing the web page to freeze up on one of my pages: https://sne.space. To reproduce the behavior, click the "select all" button then the "export to CSV" button.
I do have some custom code for the CSV button but it isn't doing too much, just excluding a few columns:
extend: 'csv',
text: 'Export selected: CSV',
exportOptions: {
modifier: { selected: true },
columns: ':visible:not(:first-child):not(:last-child):not(:nth-last-child(2))',
orthogonal: 'export'
}
This page has some sister sites with many fewer rows where the export button works just fine: https://tde.space, https://kilonova.space, https://faststars.space, so it appears it the issue might just be the fact that this table has 50k rows. However, there's the possibility that there's a "bad" row in the table causing the export to lock up upon export, but I am not sure how to figure that out.
Thanks for reading!
Answers
Could you try downgrading your DataTables to v1.10.16 please? There is a performance regression in the latest versions that causes the export of data to be really slow (although it did fix a bug).
Allan
Hi @allan, I'm using the CDN and it's difficult to find a combination of datatables + extension versions compatible with 1.10.16. Here's my current setup:
dt-1.10.18/b-1.5.2/b-colvis-1.5.2/b-html5-1.5.2/r-2.2.2/sc-1.5.0/sl-1.2.6
...what versions should I be using for the other extensions?
Just drop the
dt-*
part so you get the current extensions, and include 1.10.16 directly.Allan
Is this fixed in 1.10.19 @allan? Also, I notice on the main page the instructions are for 1.10.19, whereas the download page still shows 1.10.18 as the latest version.
I verify that it works in 1.10.16, although it's still a bit too sluggish for my taste (roughly 10 seconds to process). Any thoughts on how to speed it up?
Yes - have the server do the CSV file creation.
No. Current target is 1.10.20, but it depends on if I can resolve the performance issue without reintroducing the bug that was fixed.
There was an npm packaging error with 1.10.18. The software for the two versions is identical.
Allan
@allan Could you provide more information about that bug that's fixed in 1.10.19?
Thanks to this post I was able to solve the same performance issue, but I'm worried about data integrity.
Thanks.