How to improve InitializeComponent's performance

Posted by: leandro.oguro on 16 May 2018, 6:02 am EST

    • Post Options:
    • Link

    Posted 16 May 2018, 6:02 am EST

    Hello,

    I know this may sound weird but I’m currently working on a project which is using ActiveReports v3, the process basically involves creating an instance of a given report, calling Run and then exporting the output to PDF multiple times in parallel.

    I couldn’t help but notice that each report takes a few seconds to be generated and, since there are thousands of them, it take a good time to generate them all, even in parallel.

    After doing some profiling I noticed that the “InitializeComponent” of the reports take around 40% of the CPU time whilst the method “Run” is taking around 30% of the CPU time.

    So here’s my question, is there any way to improve the performance of the InitializeComponent seeing that all it’s done is from the auto generated code, maybe some parameter or configuration that ActiveReport has to improve this?

    And second question is: is there any way to improve the “Run” time? There’s no hard optimization, so far, so I’m trying to figure out a way to reduce this time.

    Any help would be much appreciated

    PS.: I installed the trial version of ActiveReports v12 to see if it would improve the performance and still have the same problem, both “InitializeComponent” and “Run” take most of the CPU time.

  • Posted 17 May 2018, 12:24 am EST

    Hello Leandro,

    As per my understanding, are you exporting thousands of report to Pdf Format multiple times in the parallel thread? If my understanding is correct, around 1000 of thread running in parallel to export the report in PDF export multi times which are also running in the parallel thread.

    Also, in my opinion, running so much thread in parallel will lead to increase CPU usage. You can create a batch of 100 reports which will be run in parallel thread. This may solve your problem.

    Please share your thoughts if my understanding is incorrect. Also, please share the layout of your report and how you are using threading in your sample.

    Thanks,

    Mohit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels