Bill H <> wrote in news:24e1c65f-4fc3-4b37-a044-
:
> Background:
> I have a program that uses PDF:API2 to generate pdf files based on
> html text and images. When done it then generates preview images of
> the pages using Imagemagik. The program does not interaface with the
> web so there is no communication with a browser.
>
> The questions I have are, is there any significant speed increase
> going to mod_perl
mod_perl works within Apache, so I don't think it is relevant to your
situation.
> or even compiling it to an executable? From what I
> have heard and read (and this could be wrong), the mod_perl just keeps
> it in memory so that it is faster getting started and that compiling
> just wraps the code in a perl script interpreter (for lack of a better
> term). Are these true?
Yes. In the most naive scenario, mod_perl represents a speedup over CGI
by not going through the whole invoke perl, compile modules etc routine
every time a Perl script is invoked via Apache.
Yes to the second question as well.
> Looking at perldoc perlcompile it mentions that it will make C source
> out of your perl script but then gives caveats about how it is
> incomprehensible. Discounting this, since I could always make changes
> to the perl code and "re-compile", does it actually make c source will
> compile to an executable? What about included Libs (such as the
> PDF:API2)? Do they get "compiled" also?
I do not know the internals. I do not care about the internals.
If you are looking to speed up your program, trying to compile to C is
the last avenue you should be considering. It is better to look at how
your program does what it does and identify what it does slowly and
which of those tasks that it does slowly represents opportunities for a
speed-up by changes to code or algorithm.
http://www.perl.com/pub/a/2001/06/27/ctoperl.html
http://www.perl.com/pub/a/2004/06/25/profiling.html
Sinan
--
A. Sinan Unur <>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/