page unresponsive error in google chrome while downloading

page unresponsive error in google chrome while downloading

hardickhardick Posts: 7Questions: 2Answers: 0

Hi we are facing page unresponsive error in google chrome while downloading in excel or any other mode where there are 40K+ rows and 30+ columns in the table. let me know how to handle this.
we are facing this in other browsers also

Answers

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    Thanks for your question. As noted in the forum rules, please post a link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Allan

  • hardickhardick Posts: 7Questions: 2Answers: 0

    Hi thanks for replay,

    i have created a sample example in jsfiddle and shared the like below

    https://jsfiddle.net/af3w94tb/

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    It looks like a really large part of it is the HTML entity decoding. That (and other tidying operations) can be disabled by using:

            exportOptions: {
              columns: ':visible',
              stripHtml: false,
              trim: false,
              stripNewlines: false,
              decodeEntities: false,
            }
    

    It won't work miracles, you are asking quite a lot from a client-side XSLX creator, but it will help.

    Allan

  • hardickhardick Posts: 7Questions: 2Answers: 0

    Hi i have worked with the code shared but it didn't work. still same issue
    i have updated the sample code in below link
    https://jsfiddle.net/asoncfty/

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    Takes 26 seconds to create the Excel file for Chrome on my laptop now - yup that's a long time. But it is also a lot of data. Profiling it shows that nearly all of the time is taken up creating the XML nodes:

    The first big block is getting the data from the DataTable. The bit in the middle is creating the XML nodes. The final part is converting the XML into a string.

    The only way I can see of speeding this up is to create everything as a string up front, but that significantly reduces customisablity. It would also be a fairly major under taking since we'd need to rewrite the export.

    Realistically, I think the best way to create such a large file is to use a server-side script to create and then download the XSLX file.

    Allan

  • hardickhardick Posts: 7Questions: 2Answers: 0

    Hi Thanks,

    is there any option to download it from server side but the data rendered from client side with json data

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    No, there's no option for that I'm afraid. The next project we'll be working on will give support to generate the exported files on the server, so that would help in this scenario, but that'll be a few months out still,

    Colin

This discussion has been closed.