a pretty exciting result for parallel D lang rmd following defrag by name

Jay Norwood jayn at prismnet.com
Sat Apr 7 18:18:48 PDT 2012


These are measured times to unzip and then delete a 2GB folder in 
Win7. Both are using the parallel rmd to remove the directory on 
a regular hard drive.  The first measurement is for an unzip of 
the archive.  The second is remove of the folder when no defrag 
has been done.  The third is unzip of the same archive.  
Following it, I used a myDefrag script to sort the LCN positions 
of all the files in the folder based on the full path name.  They 
describe this sort by name script on their website.  Following 
that I ran the rmd D program to remove the folder, and it took 
only 3.7  secs ( vs 197 secs the first time). I thought I must 
have done something wrong so I repeated the whole thing, and zipd 
up the folder before deleting it and also looked at its 
properties and poked around in it.  Same 3.7 second delete.   
I'll have to analyze what is happening, but this is a huge 
improvement.   If it is just the sequential LCN order of the 
operations, it may be that I can just pre-sort the delete 
operations by the file lcn number and get similar results.  It 
also makes a case for creating a zip and unzip implementations 
that preserve the sort by filepath order.

G:\>uzp tz.zip tz
unzipping: .\tz.zip
finished! time: 87066 ms

G:\>rmd tz
removing: .\tz
finished! time:197182 ms

G:\>uzp tzip.zip tz
unzipping: .\tzip.zip
finished! time: 86015 ms

G:\>rmd tz
removing: .\tz
finished! time:3654 ms


Below is the simple sortByName defrag script that I ran prior to 
the deletion.


# MyDefrag v4.0 default script: Sort By Name
#
# This is an example script.

Title('Sort By Name tz')
Description('
Sort all the files in G:\tz by name on all the selected disk(s).
')



WriteLogfile("MyDefrag.log","LogHeader")

VolumeSelect
   Name("g:")
VolumeActions

   AppendLogfile("MyDefrag.log","LogBefore")

   FileSelect
     DirectoryName("tz")
   FileActions
     SortByName(Ascending)
   FileEnd

   AppendLogfile("MyDefrag.log","LogAfter")

VolumeEnd

AppendLogfile("MyDefrag.log","LogFooter")



More information about the Digitalmars-d mailing list