[EXPORT] Huge performance issue

[EXPORT] Huge performance issue

WuigiWuigi Posts: 10Questions: 2Answers: 0

Hey,

Just a quick message for allan: there's a huge performance drop with the Buttons extension compared to TableTools when working on big tables.

See the example here: lgambini.free.fr/datatables_export.htm
(left buttons are "Buttons", right buttons are TableTools)

A CSV export takes:
- ~5 seconds with TableTools
- ~1.5 minutes with Buttons

(haven't been able to get Flash export with Buttons to work, so not sure if it's Buttons vs TableTools or HTML5 vs Flash)

This makes Buttons unusable for big tables unfortunately - just wanted to let you know, especially since you're considering dropping Flash support altogether, in case it's something that can be fixed/optimized.

And thanks again for the amazing work!

Replies

  • allanallan Posts: 63,276Questions: 1Answers: 10,424 Site admin

    Awesome test case - thank you.

    It appears that what is really hurting the performance here is that the row selector is being used for every cell. I'm not sure why that is happening. I will investigate and post back when done so.

    Regards,
    Allan

  • allanallan Posts: 63,276Questions: 1Answers: 10,424 Site admin

    I've just committed two changes based on your test case:

    • DataTables core - Reuse rows that can be selected from
    • Buttons - Improve how the selectors operate and reuse the selectors.

    Example running with these two changes: http://live.datatables.net/xuberoso/1/edit .

    The Buttons CSV export is now running about 5.8 seconds on my machine - a fairly massive improvement over what it was before, so thank you!

    I feel there is probably still a way to improve it further - the row selector (inside the cell selector) is taking around 60% of that time, and that should really be faster. However, I'm happy with that for a first pass :smile:

    Allan

  • WuigiWuigi Posts: 10Questions: 2Answers: 0

    Thanks Allan this is great! Definitely a massive improvement that will allow me to do the switch to buttons - I was quite frustrated not to be able to, especially with the latest customize option :)

    Any further optimization would be awesome if doable, but in the meantime I'll try and add a loading window.

    Thanks again for everything :)

This discussion has been closed.