[Info-vax] improve performance of /EXCLUDE

George Cornelius cornelius at eisner.decus.org
Mon Jan 26 16:43:12 EST 2015


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.

DIRECTORY, at least, seems to not know to only access to the file header
when turns out it will actually need information from the header, although
it does know how to do it in the simple case, i.e., without a qualifier
like /size .

Apparently it goes all the way through to accessing the header for all
files being considered in the second case before checking whether the
/EXCLUDE would have applied.

George



More information about the Info-vax mailing list