ZMailer

Mariano Absatz mailscanner at lists.com.ar
Mon Sep 22 16:09:20 IST 2003


OK... but I think I see a bug in there:

after patching I have something like
    if ($CriticalQueueSize==0 || $MsgsInQueue<=$CriticalQueueSize) {
      # SortedFiles is array of full pathnames now, not just filenames
      @SortedFiles = sort { $ModDate{$a} <=> $ModDate{$b} } keys %ModDate;
    }
but I think it should be:
    if ($CriticalQueueSize==0 || $MsgsInQueue<=$CriticalQueueSize) {
      # SortedFiles is array of full pathnames now, not just filenames
      @SortedFiles = sort { $ModDate{$a} <=> $ModDate{$b} } keys %ModDate;
    }
    else {
      @SortedFiles = keys %ModDate;
    }
otherwise, the @SortedFiles array would be empty and no messages would be 
processed. Am I wrong?

El 20 Sep 2003 a las 8:50, Julian Field escribió:

> I have added a little patch to your ZMailer.pm file to implement a new 
> configuration option I have added in an attempt to speed up MailScanner 
> when scanning very large queues.
> 
> Please can you add it to your ZMailer.pm file so we keep our 2 copies in sync.
> 
> Many thanks,
> Jules.
> 
> 652c652
> <   my($batchempty);
> ---
>  >   my($batchempty, $CriticalQueueSize);
> 667a668,671
>  >   # If there are too many messages in the queue, start processing in
>  >   # directory storage order instead of date order.
>  >   $CriticalQueueSize = MailScanner::Config::Value('criticalqueuesize');
>  >
> 717,718c721,729
> <     # SortedFiles is array of full pathnames now, not just filenames
> <     @SortedFiles = sort { $ModDate{$a} <=> $ModDate{$b} } keys %ModDate;
> ---
>  >     # Not sorting the queue will save us considerably more time than
>  >     # just skipping the sort operation, as it will enable the next bit
>  >     # of code to just use the files nearest the beginning of the directory.
>  >     # This should make the directory lookups much faster on filesystems
>  >     # with slow directory lookups (e.g. anything except xfs).
>  >     if ($CriticalQueueSize==0 || $MsgsInQueue<=$CriticalQueueSize) {
>  >       # SortedFiles is array of full pathnames now, not just filenames
>  >       @SortedFiles = sort { $ModDate{$a} <=> $ModDate{$b} } keys %ModDate;
>  >     }

--
Mariano Absatz
El Baby
----------------------------------------------------------
Justify my text? I'm sorry but it has no excuse.





More information about the MailScanner mailing list