Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This works, but it is slower than I expect it to be. For example, if I generate the folder of SVGs, and then manually run the Java program from the shell it takes 5-6 seconds to create the PDF. However, executing the Java command from within my perl script takes 13 seconds. At first I thought this was just due to the overhead of calling any external command from within perl, but if I replace my call to system with a simpler call (e.g., system('java -version') ) then that call takes less than a second.$report_failure = system('java -jar /var/www/helper_code/svg2pdf.jar ' + . "$output_files$invoice_data_ref->{'actual_invoice_id'}" . '/master +*.svg' . ' ' . "$output_files$invoice_data_ref->{'actual_invoice_id'} +" . '/master.pdf');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Speeding up external command execution
by BrowserUk (Patriarch) on Apr 13, 2014 at 22:48 UTC | |
|
Re: Speeding up external command execution
by graff (Chancellor) on Apr 14, 2014 at 00:24 UTC | |
|
Re: Speeding up external command execution
by eye (Chaplain) on Apr 13, 2014 at 21:53 UTC | |
|
Re: Speeding up external command execution
by frozenwithjoy (Priest) on Apr 13, 2014 at 19:35 UTC | |
by Anonymous Monk on Apr 13, 2014 at 19:42 UTC | |
|
Re: Speeding up external command execution
by boftx (Deacon) on Apr 13, 2014 at 19:44 UTC | |
|
Re: Speeding up external command execution
by soonix (Chancellor) on Apr 13, 2014 at 21:33 UTC | |
|
Re: Speeding up external command execution
by basiliscos (Pilgrim) on Apr 14, 2014 at 08:08 UTC |