Export to Excel very slow from version 1.10.17
Export to Excel very slow from version 1.10.17
Hi,
I'm using datatables on a big amount of data, containig more than 6000 row, ~ 25 column each.
I was using it with dT version 1.10.16 and I wanted to upgrade the version to the last one 1.10.19.
I've noticed that the Export to Excel functionality is very very slower with the last version.
After trying several time switching versions, with the same dataset, I've got this results:
version <= 1.10.16 is very fast (~ 4 seconds)
verison >= 1.10.17 is very slow (> 30 seconds)
You can see here the difference:
version 1.10.16
version 1.10.17
Did some of you also noticed this behaviour?
thanks!!
frasurf
Replies
Interesting, with Chrome on the Mac both take about 2 seconds but with Firefox the 1.10.17 test case takes much longer like you described.
What browsers are you using that cause the problem?
EDIT: Thanks for the test case!
Kevin
I'm using Chrome 67.0.3396.99 on Mac 10.13.5. Result:
1.10.16 ~ pretty immediate (half second maybe)
1.10.17 ~ more than 2 seconds
I tried just now Firefox 61 and.... result:
1.10.16 ~ pretty immediate (less than 1 sec)
1.10.17 ~ more than 30 seconds (a dialog asking you to stop the script appears)
I "kindly" used the test case from @colin in another post.
Its caused by this change. The .16 and earlier there was a bug whereby the cell selector modifier wouldn't be applied. It appears that fixing that unfortunately has introduced a performance regression.
Allan
Thank you for your reply.
I understand. Unfortunately this perfomance, especially with Firefox, makes the export for large dataset an issue. Would it be possible to "activate" the new behaviour only when {selected:true} is present?
thanks again,
fserafin
That would mean that DataTables core needs to have knowledge of the selector plug-ins, which isn't great for development. However, I do see this as an issue and it is something I will try to address.
Allan
thank you very much!!
Any update on this and fixing the performance problem? I am still seeing the same issue in version 1.10.19.
Not yet sorry. Its something I've yet to look at but will do before 1.10.20 release which I don't expect to be too far away - probably February.
Allan
Hi @allan
is there any news about this issue? It takes almost 2 minutes to download a 6000 rows table, both in Chrome and Firefox. The browser even prompt for a restart as it thinks something freezed.
Hi - yes indeed I've committed a fix for this in the last few days and will be part of the next release. I forgot to push the change up, so the nightly won't be up-to-date yet, but will carry this change in the next 10 minutes.
Allan
Thanks @allan , the export is now super fast!
@allan Please let me know how to download this new version ?
There isn't a release version that carries this yet, but you can download the nightly until 1.10.20 is tagged and released.
Allan
@allan Did you release the 1.10.20?
Or, are you fixing other thing so you cannot release it?
Also, if we care of performance then should we stay with 1.10.16?
Or, nightly is faster?
Hi @soseki_m ,
1.10.20 hasn't been released yet - it hasn't been fixed, but waiting for that release. There's no date yet, but it shouldn't be more than a few weeks. It would be worth using the nightly release if you can, it should be faster, but we'd welcome any feedback you have on the performance of nightly vs 1.10.16.
Cheers,
Colin
Hi @colin
Thank you very much for quick reply.
Okay, we might stay with nightly for now.
Then, I am curious about how you improve the performance.
Do you think you can tell me?
When pressing download excel web-browser stays frozen, but
I added an action function to show a loading spinner while document is being process.
Timeout function finish when document is ready.
It works for me, hope it helps.
Nice, thanks for sharing.
Any news regarding 1.10.20?
Or is it possible to change some lines in 1.10.18 to get the speed back, even if that means losing some feature?
I am a bit hesitant to use the nightly in production.
Hi @tom99 ,
It should be in a couple of weeks. We aim to release a new CDN server next week, then a big release of DataTables and all extensions the following week.
Cheers,
Colin
Thanks for the quick answer. Unfortunately, that is a bit long for us. We are exporting 10000 rows and this takes "forever".
Any idea where I could patch something in DataTables to get the old behavior? I'd rather not go back to 1.10.16.
If you're going to patch, and the nightly releases work for you, I'd suggested just grabbing the current nightly and hosting it locally.
C
I have now basically reverted this commit in 1.10.18 and it is fast again:
https://github.com/DataTables/DataTablesSrc/commit/1701640a4c245bef3cca1a7c0758a4cbb9add52d
The problem with reverting that commit is that it introduces a but on export with optional conditions (selected rows). That might effect how you are using it, but it is something we need to address.
Have you tried the nightly? That should fix it.
Allan
Thanks for the pointer. I don't think the bug with the selected rows is a problem for us at the moment.
Did you try the nightly? It would be a great help to us if you could and report back on its performance, as we had a bit of a nightmare with that one.
Allan
Sorry for the delay.
I used datatables.js, datatables.buttons.js and buttons.html5.js from nightly and the export time is about the same as 1.10.16, maybe a split-second slower.
Exporting table with 12100 rows and 42 columns takes about 1 second with Chrome.
Firefox takes about 2 seconds.
So, everything is fine from my point of view.
Perfect, thanks for letting us know.
I have the same issue in FF but not in Chrome and I am using datatables v1.10.18
Is this code fix released in 1.10.20 by now?
Thanks