Unplanned
Last Updated: 01 Sep 2023 06:31 by ADMIN
Jaroslav
Created on: 21 Aug 2023 08:44
Category: Kendo UI for Angular
Type: Bug Report
0
Excel export of treelist is very slow for large lists

We are exporting an Excel from a treelist -> there are merged cells, and the table has lots of rows (~20k).

It's taking forever (it's unusable) and the reason is that there is an O(N^2) bug in the toXML function: each row adds a merged cell range, and the mergedCells array is scanned linearly for every new row.

I was able to fix this by adding a mergedCells hash (I would be happy to create a pull request).

Also, as a related issue, it would be nice to be able to change the compression level on the generated zip file, because the default again takes forever for large enough files.

3 comments
ADMIN
Yanmario
Posted on: 01 Sep 2023 06:31

Hi Jaroslav,

Thank you for the provided information.

I've logged an issue in our private ooxml repo with the provided details, for our developers to check the validity of the fix or for them to implement their own optimization. If the optimization is valid, I will update you and add Telerik Points to your account for helping us improve our performance.

Have a great day!

Regards,
Yanmario
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Jaroslav
Posted on: 28 Aug 2023 08:15

The attached file includes more than is necessary because in order to patch the toXML function I had to include other private constants / functions that were not part of the Worksheet class. The main change is the addition of "mergedCells2" which is the same as the "mergedCells" array, except it's a dictionary for fast lookup. It could also be called "mergedCellsHash" or similar.

Also, the compression level is set in the same file:

const DATA_URL_OPTIONS = { compression: 'DEFLATE', compressionOptions: { level: 1 }, type: 'base64' };

(I'm setting it to 1, the fastest setting). It would be nice if this could be set via excel export options from the outside (not sure what the best mechanism for that is... an angular injectable maybe?). The reason is that a lower compression level makes it possible to speed up excel generation on the client side.

Attached Files:
ADMIN
Yanmario
Posted on: 28 Aug 2023 07:35

Hi Jaroslav,

Thank you for the provided feedback.

Could you share with us the toXML code optimization, so that our developers can take a look and see if it is valid for implementation? If it is valid, I would also update your Telerik Points for helping us improve our product.

For the zip file compression, I am not sure if that is related to our Document Processing library as Kendo UI for Angular, doesn't seem to offer such functionality. If it is related to Document Processing, then a separate issue can be opened for their portal:

https://feedback.telerik.com/document-processing

Regards,
Yanmario
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources