Page 1 of 1

PDF Export is very slow

Posted: Tue May 02, 2023 2:47 pm
by fghiggi
Hello,

I am using version 2020.2.3 to export PDFs, but when I have a large number of pages, the response time is very slow.

In this repository https://gitlab.com/fghiggi/stimulsoft-pdf-example, I made an example of how we use the tool in our software and compared the processing times for several page counts.

The example closest to reality would be the one with 1000 pages, as our clients use more than 1500 pages. As can be seen from the results, 1000 pages take more than 30 seconds to process.

That is considering only one report being generated at a time. In production, we have thousands of reports being generated concurrently, so the ones with 1500 pages take more than 4 minutes to process, resulting in timeouts on our servers.

Could this processing time be improved somehow?

Re: PDF Export is very slow

Posted: Tue May 02, 2023 8:48 pm
by Lech Kulikowski
Hello,

We require more time to investigate the issue thoroughly. Rest assured, we will keep you informed about the outcome as soon as possible.

Thank you.
#11245

Re: PDF Export is very slow

Posted: Mon May 08, 2023 9:44 pm
by Lech Kulikowski
Hello,

We analyzed the project and the report.
Export to pdf is not "very slow", it's just not as fast as you would like it to be. You have a picture logo on every page, so 1000 pages is 1000 pictures.
The slowest part of the export is the image processing. The default dpi=100, you set it to dpi=600, which increases the pixel size of the pictures 36 times!
That's why it takes much longer to process them.

In the release 2023.2.1 the export to PDF has been improved.
If the ImageResolutionMode property in the export settings is set to Auto, the picture will be exported in its original resolution, which allows you to cache the pictures, speeding up their processing.
This allows you to export reports with many identical images many times faster. The export time of your report is reduced from 30 to 9 seconds.
Also, when ImageResolutionMode=Auto you get minimal blurring of the image, because its resolution is not changed.

Thank you.