Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
I have a web application that generates large, detailed PDF reports. The reports are created through a combination of Perl and Java. Perl is used to generate SVGs for each page of the report. The Perl script then calls two different Java programs via system and backticks. The first java program converts each SVG to a PDF. The second merges all of the PDFs into a single document which is returned to the Perl script. Finally, the Perl script stores the result in a database using DBI.
It's a complicated system, but it works well for generating the reports that we need. The problem is that it is slow. I think there is a significant amount of time being spent on startup, both for Perl as well as for each of the system commands. I can pretty easily make the Perl persistent. Is there a way to save time
on the system commands that execute the Java programs? Unfortunately, replacing the Java isn't a viable option at this point.