Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Delay in program execution
May 24, 2008, 10:26 am
rate this thread
contains 40+ modules. It runs very fast, but I have noticed over the
years, if I make changes to a module's code and post it, there is a 3
or 4 second delay in its execution the first time I run it, then every
other time it runs with no delay. I know (or believe strongly) perl
compiles the source for running the program, but does it keep this
compiled version around for later use unless you change the code and
then it will compile it again (that is the only reason I can think of
for the delay).
I am not running any mod_perl and this is running on an Apache server
Re: Delay in program execution
No. The soure is compiled each time the program is started (and it
shouldn't take "3 or 4 seconds" unless it is really huge).
You wrote that you don't use mod_perl but you didn't write what you do
use and how you "post" a module. If your perl program is started for
each request (as CGI does), then I don't see any reason for the
bevaviour you observe. But if your perl program runs persistently in the
background (maybe via FastCGI or PPerl) and needs to be restarted after
posting the module, than that's possible.