Report of type List of Entities takes incredibly long to render


I am developing an accounting app and when trying to output a pdf report based on a word template, it takes so long to render.

Actually the first time took very long (more than 20min!!!). In tdhe following attempts it took more reasonable time periods to render, however I can’t reduce the time below a minute long.

Is there a reason for that?

Just to give some details that might be relevant, the list of entities is a list of DTO entities, with roughly 600 elements.

I am running it via the following code snippet:

           List<PartidaBalance> ppbb = saldosBean.transformaBalance(balance);
           HashMap<String, Object> params = new HashMap<>();
           params.put("partidas", ppbb);
           Report r = dataManager.load(Report.class).query("select r from report_Report r where like :rn")
                   .parameter("rn", "Balance").one();
           byte[] bb = reportRunner.byReportEntity(r).withParams(params).run().getContent();
 , "Balance.pdf");

So well, target accomplished… but the report still takes over a minute to render. If debugging, I can verify that the time it takes to produce the ppbb ArrayList is roughly 10-15 secs, whereas the rest of the code until the report is shown on the screen is over a minute.

Are these the time lengths I must expect?

Many thanks for reading.


Do you use LibreOffice/OpenOffice for PDF conversion? Probably that’s the conversion that takes all that time. If so, then I’m afraid we can’t affect it. As an experiment you may try to change the output format to DOCX and see how the result time will change.