Slower rendering of xlsx with 3.10.0 version



  • Hello,

    we are generating a xlsx file with about 50k rows. We were using version 2.4.0. and it was taking around 5-6 seconds to complete. Recently, we've upgraded to 3.10.0 and now it's taking over 30 seconds, going into timeout.

    Engine: handlebars
    Recipe: xlsx

    Template (with redacted data):

    {{#xlsxReplace "xl/worksheets/sheet1.xml" "worksheet.sheetData[0].row[3].c[0]"}}
        <c t="inlineStr"><is><t> {{}}</t></is></c>
    {{/xlsxReplace}}
    
    {{xlsxRemove "xl/worksheets/sheet1.xml" "worksheet.sheetData[0].row" 6}}
    
    
    {{#each DATA}}
    {{#xlsxAdd "xl/worksheets/sheet1.xml" "worksheet.sheetData[0].row"}}
        <row>
            <c t="inlineStr" s="{{@root.$removedItem.c.[0].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[1].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[2].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[3].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[4].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[5].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[6].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[7].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[8].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[9].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[10].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[11].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[12].$.s}}"><is><t>{{}}</t></is></c>
            <c t="n" s="{{@root.$removedItem.c.[13].$.s}}"><v>{{}}</v></c>
            <c t="n" s="{{@root.$removedItem.c.[14].$.s}}"><v>{{}}</v></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[15].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[16].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[17].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[18].$.s}}"><is><t>{{}}</t></is></c>
            <c t="n" s="{{@root.$removedItem.c.[19].$.s}}"><v>{{}}</v></c>
            <c t="n" s="{{@root.$removedItem.c.[20].$.s}}"><v>{{}}</v></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[21].$.s}}"><is><t>{{}}</t></is></c>
            <c t="n" s="{{@root.$removedItem.c.[22].$.s}}"><v>{{}}</v></c>
            <c t="n" s="{{@root.$removedItem.c.[23].$.s}}"><v>{{}}</v></c>
            <c t="n" s="{{@root.$removedItem.c.[24].$.s}}"><v>{{}}</v></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[25].$.s}}"><is><t>{{}}</t></is></c>
            <c t="inlineStr" s="{{@root.$removedItem.c.[26].$.s}}"><is><t>{{}}</t></is></c>
    
        </row>
    {{/xlsxAdd}}
    {{/each}}
    
    
    {{{xlsxPrint}}}
    
    

    Profiler log:

    
    info
    +0
    Render request 6 queued for execution and waiting for available worker
    info
    +741
    Starting rendering request 6 (user: admin)
    info
    +0
    Rendering template { name: , recipe: xlsx, engine: handlebars, preview: false }
    debug
    +1
    Inline data specified.
    debug
    +3
    Base url not specified, skipping its injection.
    debug
    +290
    Rendering engine handlebars
    debug
    +679
    Executing recipe xlsx
    info
    +2
    xlsx generation is starting
    debug
    +84
    Starting child request to render xlsx dynamic parts for generation step
    info
    +284
    Starting rendering (child) request (user: admin)
    info
    +1
    Rendering anonymous template { recipe: html, engine: handlebars }
    debug
    +0
    Inline data specified.
    debug
    +7
    Base url not specified, skipping its injection.
    debug
    +284
    Rendering engine handlebars
    debug
    +594
    Executing recipe html
    debug
    +289
    Skipping storing report.
    info
    +1
    Rendering (child) request finished in 3261 ms
    info
    +371
    xlsx generation was finished
    info
    +0
    xlsx transformation is starting
    debug
    +35
    Parsing xlsx content
    warn
    +26340
    Report render failed
    (because) report cancelled by the client or closed network
    Error: Report cancelled by the client or closed network
        at Object.close (/app/node_modules/@jsreport/advanced-workers/lib/threadWorker.js:147:21)
        at Object.release (/app/node_modules/@jsreport/advanced-workers/lib/pool.js:38:22)
        at EventEmitter.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/reporter.js:399:18)
        at Object.onceWrapper (node:events:627:28)
        at EventEmitter.emit (node:events:513:28)
        at Socket.<anonymous> (/app/node_modules/@jsreport/jsreport-express/lib/routes.js:68:20)
        at Object.onceWrapper (node:events:628:26)
        at Socket.emit (node:events:525:35)
        at TCP.<anonymous> (node:net:301:12)




  • Thank you for the response. We are currently licensed for versions up to 3.10.0, is it possible to have a workaround for this problem until we upgrade to newer versions?



  • Have you tried the latest to see if the problem persists?

    I'm afraid the problem solution described here has no workaround. Only downgrade to v2 or update to latest.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.