I have a csv file that contains about 8000 rows. Each row contains a student
username, professor username, and class name. I also have a vbs file that
loops through each row in the csv file, using %COMSPEC% with mkdir and
xcacls to create a directory structure for each class in our college. For
each class' directory, the professor is given full access and each student
is only given full access to their personal folder within the directory.
There is also a shared folder within each class directory; the students are
given read access to this folder and the professor is given full access.
Domain Admins are given full access to everything.
The script to create all of this works fine and all of the directories and
permissions are created perfectly. But here is what I don't understand: The
script starts off working very efficiently - creating about 1,600 folders in
the first hour. But it gradually slows down as it goes along. After about 10
hours of running, it is only creating about 600 folders/hour. The end result
is that it takes over 13 hours to complete when (based on the first hour) I
expected it to finish in 5 hours or less.
One possibility is that the script slows down because it has to modify the
ACLs on all those shared folders, some of which can contain up to 50 ACL
entries by the time it completes. Another possibility is hardware
limitiations, but I don't think so -- I'm running the script on a 3.0GHz
Intel P4 Dual Core processor with 2GB or RAM running WinXP Pro and the
performance monitor is indicating both the CPU and memory utilizations are
below 50%. I don't think it's a network issue either - I ran the script on
my local drive and it experiences the same slow down as it does running on a
network drive. Perhaps it is a Windows limitiation? I've run a Unix-based
script using the same logic against the same csv file using the same mkdir
and cacls commands, and it completes in about 4 hours. But for some reason
the unix solution causes inheritance problems in some of the directories,
which is why I tried using a Windows solution instead.
Does anyone have an idea why my vbs script is slowing down like this? Thanks
for any help out there...