[Info-vax] improve performance of /EXCLUDE

George Cornelius cornelius at eisner.decus.org
Tue Jan 27 13:06:34 EST 2015


In article <8$08X6aM9z$G at eisner.encompasserve.org>, cornelius at eisner.decus.org (George Cornelius) writes:
> In article <ma2j4n$hrv$2 at news.kjsl.com>, helbig at asclothestro.multivax.de (Phillip Helbig (undress to reply)) writes:
>> At least in some cases, it seems that /EXCLUDE suppresses just the 
>> output, not the processing.  Wouldn't it be possible to improve this?
> 
> Try this:
> 
>  $ SP:=SHOW PROCESS/ACCOUNTING
>  $ PIPE SP ; DIRECTORY [.MAIL]/EXCLUDE=*.MAI /TOT ; SP
> 
> With 3000 files in [.mail], all ending in .mai, this returns instantly
> (0.16 s) and uses very few direct and buffered I/O's.
> 
> On changing to directory/size it's a completely different story: I get
> 17 s elapsed time, 3000+ each of direct I/O's and buffered I/O's.

[...] 

By the way, this situation is analagous to use of the find operation
in Unix/Linux.

Under Linux, pretty much as far back as I remember, find is quite
fast as long as it only accesses directories and slows down quite
noticeably otherwise.  An example:

 find . -name 'abc*' -mtime -1 -exec ls -ld {} \;

   vs

 find . -mtime -1 -name 'abc*' -exec ls -ld {} \;

The latter is comparitively slow with large numbers of files
and few matches on 'abc*' .

But find is of course designed for fine-grained control where
DIRECTORY is not.

As a system administrator I pay attention to which of my
commands is efficient and which is not, because a certain
percentage of my routine involves searching for files.  And
if the DIRECTORY command is slow in certain contexts I
have workarounds - just not quite as many as in newer
and more actively maintained environments. Examples:


 (I) F$SEARCH() loops

 (II) DFU

  DFU

   SEARCH

    /FORMAT
       /FORMAT=format_string

       Used with /OUTPUT. Create an output file using
       the format as described in formatstring. The format string
       MUST contains the !AS directive; DFU fills in the resultant
       file there. Example :

        DFU> SEARCH/FILE=*.TMP/FORMAT="$delete/confirm !AS"


George



More information about the Info-vax mailing list