CSV Export Performance Concerns

CSV Export Performance Concerns

LeighLeigh Posts: 18Questions: 1Answers: 0
edited August 2018 in Free community support

My first question is should I be using "csvHtml5" instead of "csv"? I'm not clear on which is considered the go-to csv exporter. I'm currently using the csvHtml5 extension, assuming it to be the most modern implementation/performant (and I'm only concerned with IE11+/Chrome).

I'm finding that the csv process is quite slow, however. Example timings below (for a 14 column table):

~1500 rows takes around 1 second (279k file)
~4500 row takes around 7 seconds (803k file)
~6500 rows takes around 20 seconds (1122k file)
~20,000 rows takes around 4.5 minutes (4210k file) - Chrome constantly pops up the "Wait or Exit" prompt

Are these stats in-line with what everyone else is seeing? Is there any way to improve this?

I'm using the latest version of each datatables js file (I have double checked), and I'm also using the experimental SearchPane extension (but I have disabled this to ensure it wasn't having an impact).

I don't ideally want to have to rewrite the CSV generation in C#, as I'll lose some of the power of DataTables (SearchPane filtered results, for example), but the performance is a concern.

Thanks

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    There is a performance regression with the current DataTables, which fixed a bug, but did slow things down a bit. it might be worth trying 1.10.16 and see how that performs for you.

    That said, there is a limit to what the client-side can do. There isn't a hard limit, but keep in mind that some users of your site / app might have a really old processor, so even 6500 rows might take a long time to export. If you know you are going to need to export tens of thousands of rows, a server-side export is the way to go.

    Allan

  • LeighLeigh Posts: 18Questions: 1Answers: 0

    Thanks for the prompt response Allan!

    I appreciate there is a limit to what can be done client side, and if my findings are in-line with the norm, then that's not a problem (as I go down the server side route). I just want to be sure I've not hit performance issue that I can do something about.

    I'll give the updated release a try. Thanks again.

  • LeighLeigh Posts: 18Questions: 1Answers: 0
    edited August 2018

    I can confirm that 1.10.16 fixed my performance issue! Thank you.

    4.5 minutes down to a couple of seconds :smile:

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Excellent! I will see if there is something I can do about that. Logged now!

    Allan

This discussion has been closed.