home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / vmsnet / internal / 1127 < prev    next >
Encoding:
Text File  |  1992-07-28  |  1.5 KB  |  38 lines

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