home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: vmsnet.internals
- Path: sparky!uunet!darwin.sura.net!aplcen.apl.jhu.edu!bandy
- From: bandy@aplcen.apl.jhu.edu (Bandy michael carl 792-6000x3351)
- Subject: Re: Why does emptying a dir take so long?
- Message-ID: <1992Jul29.034838.660@aplcen.apl.jhu.edu>
- Keywords: ACP_DIRCACHE
- Organization: Johns Hopkins University
- References: <1992Jul15.123436.29887@fel.tno.nl> <97@colornet.UUCP>
- Date: Wed, 29 Jul 92 03:48:38 GMT
- Lines: 26
-
- Maarten Landzaat writes :
- >He has a few directories containing a few hundred files. Sometimes, these
- >dirs need to be emptied. He then issues a simple delete *.*;* or whatever.
- >then VMS takes an INCREDIBLE time of 2 hours (5.4) or 45 minutes (5.5)
- >to delete the files.
- <stuff deleted>
-
- A directory is maintained as a contigous, alphabetical list of the filenames
- contained within it. When you delete *.*;* it removes all files from the 1st
- block of the directory then scoots all remaining blocks down over the 1st.
- This continues till the complete list is deleted.
-
- You can see that the blocks are not completely filled but use a block splitting
- algorithm like RMS indexed files by doing a DUMP on the .DIR file itself.
- Depending on the order in which the files were added, the blocks may be less
- than 30% used, especially if they have long names.
-
- You can speed up a delete if you know that the files are named with a few
- starting letters, say X, Y and Z by doing multiple deletes like:
- DELETE Z*.*;*
- DELETE Y*.*;*
- DELETE X*.*;*. And so on.
-
- Hope this helps.
-
- Mike Bandy
-