You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Tim Moore <Ti...@formscape.com> on 2002/10/22 18:24:08 UTC

Apache::ASP->Loader and precompiling

Hi,

I've just had a go at precompiling my scripts and got it working following
the instructions at http://www.apache-asp.org/tuning.html.

However, is there a way of turning off all the compilation messages when I
start Apache? I need the output to be as minimal and user (customer)
friendly as possible. Preferably no output at all, other than the normal
Apache messages (if any).

Additional to that, is there a way of specifying the pattern in the
Apache::ASP->Loader call so that I can exclude specific files? There some
asp files which are included as part of other files but should not be
compiled on their own, and a few other files that shouldn't be compiled, but
I don't want to change the file extension if possible. I'm not hot on perl
regular expressions. I need to be able to exclude multiple files and/or
files with a certain prefix. Alternatively is there a way I can put
something in the file to tell it to not be 'pre-compiled'?

Doing this would cut down on failed compilation messages in the Apache error
log, which although doesn't affect the running of the application, it would
generate complaints from customers when they check their error log.

P.S. Am I right in assume that if I modify a file it will recompile it when
it's accessed, or does the server have to be restarted to compile it? (is
this down to the StatINC option? I've got this set to 1 at the moment).


Regards,

Tim.

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Apache::ASP->Loader and precompiling

Posted by Josh Chamas <jo...@chamas.com>.
Tim Moore wrote:
> Hi,
> 
> I've just had a go at precompiling my scripts and got it working following
> the instructions at http://www.apache-asp.org/tuning.html.

One more thing, make sure to run your application in Debug -3 setting
after preload to make sure that you really preloaded correctly, and
that those scripts you thought got precompiled really did.  There
are a bunch of settings that you need to be exactly the same between
your Loader() call & your normal settings for the precompiling of
scripts to work.

Regards,

Josh
________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Apache::ASP->Loader and precompiling

Posted by Josh Chamas <jo...@chamas.com>.
Tim Moore wrote:
> Hi,
> 
> I've just had a go at precompiling my scripts and got it working following
> the instructions at http://www.apache-asp.org/tuning.html.
> 
> However, is there a way of turning off all the compilation messages when I
> start Apache? I need the output to be as minimal and user (customer)
> friendly as possible. Preferably no output at all, other than the normal
> Apache messages (if any).
> 

Not really, make sure Debug => 0 of course, and you can try to
redirect STDERR output like so:

   open(STDERR, '>>/dev/null');
   ... loader ...
   close STDERR;

> Additional to that, is there a way of specifying the pattern in the
> Apache::ASP->Loader call so that I can exclude specific files? There som
> asp files which are included as part of other files but should not be

Try something like "prefix/.*\.asp" for a match say on files in prefix
directory only.  If regular expressions don't help you, you can always
call Loader() multiple times in different ways.

Note, that it doesn't really hurt to over preload scripts, just
under preload really.  The internal API for compiling scripts and
includes in particular is being fused in versions 2.45 & 2.47, so
there will be no real difference is how things get compiled ultimately
which means that preloading includes will become good practice as well.

> files with a certain prefix. Alternatively is there a way I can put
> something in the file to tell it to not be 'pre-compiled'?

No, there is no inspection of the files to be loaded.

> P.S. Am I right in assume that if I modify a file it will recompile it when
> it's accessed, or does the server have to be restarted to compile it? (is
> this down to the StatINC option? I've got this set to 1 at the moment).

Yes, modified files will be recompiled unless StatScripts is set to 0.
StatINC is for reloading perl modules specifically.

Regards,

Josh
________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org