Hi list.

Since I'm using Apache::ASP::Loader to precompile scripts and doing so via NFS, it kind of took a long time.
Most of it was spent not compiling scipts, but traversing files and directories which is still painfully slow on NFS.
Since a few of them contained about 2500 images, there should be no need for Loader to look into them, so I added an argument to Loader ``Ommit_Dirs'' whose value should be a reference to an array containing dirs the compiler should ommit.


I think it is reasonably useful and I *suppose* I haven't messed up, but please look into it if you're interested.

Regards,
Thanos Chatziathanassiou

diff -u Load.pm.orig Load.pm
--- Load.pm.orig      2004-07-13 15:02:42.000000000 +0300
+++ Load.pm     2004-07-13 15:07:05.000000000 +0300
@@ -65,9 +65,19 @@

     # recurse down directories and compile the scripts
     if(-d $file && ! -l $file) {
        $file =~ s|/$||;
+       #extra patch here to ommit certain directories. makes NFS compiles really 
faster
+       #dirs to ommit should be in $args{'Ommit_Dirs'}
+       foreach (@{$args{'Ommit_Dirs'}}) {
+               if ($file eq $_) {
+                       if($args{Debug} < 0) {
+                               warn("skipping compile of files in $file : Ommit_Dirs 
directive");
+                       }
+                       return;
+               }
+       }
+       #end patch
        opendir(DIR, $file) || die("can't open $file for reading: $!");
        my @files = readdir(DIR);
        close DIR;

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to