Below is a sample script that calculates the time it takes to create 500 folders and then rename them.
Macbook/1.83Ghz/2GB of RAM/160GB HD/Leopard 10.5.2 --> took 3 minutes to complete each task.
Titanium 1Ghz running 10.4.11 --> took 7 seconds to complete each task.
iMac G5 running 10.4.11 --> took 5 seconds to complete each task.
This is a 1:40 difference. Tiger 10.4.11 on older machines is running this same script 40 times faster than Leopard 10.5.2 on a faster machine.
Here is the script. Please try it out on your systems and let me know what the results are - especially for 10.5.2. I compiled it on my Macbook as an Application Bundle - so it runs as a Universal application.
tell application "Finder"
activate
display alert "This script calculates how long it takes to make 500 folders and then rename them on your current operating system"
set finderVersion to (the version)
try
make new folder at desktop with properties {name:"TestFolder4Rename"}
end try
set n to 1
set time_stamp_one to (current date)
-- Make 500 folders with the same name and a number increment
repeat 500 times
set rename_plus_num to ("DummyFolder" & n) as string
make new folder at folder "TestFolder4Rename" with properties {name:rename_plus_num}
set n to n + 1
end repeat
-- Calculate how much time it took in seconds
set time_stamp_two to (current date)
set time_difference to (time_stamp_two - time_stamp_one)
set time_dif_string to time_difference as string
activate
display alert "---------- OS " & finderVersion & " ----------" & return & return & "Creating 500 folders took approximately " & time_dif_string & " seconds to complete. Now let's see how long it takes to simply change their names…"
set time_stamp_one to (current date)
-- Rename 500 folders with a number increment
set folder_items to displayed name of every item in folder "TestFolder4Rename"
set n to n + 1
repeat with curFile in folder_items
set rename_plus_num to ("Changed Name" & n) as string
set the name of item curFile in folder "TestFolder4Rename" to rename_plus_num
set n to n + 1
end repeat
-- Calculate how much time it took in seconds
set time_stamp_two to (current date)
set time_difference to (time_stamp_two - time_stamp_one)
set time_dif_string to time_difference as string
activate
display alert "---------- OS " & finderVersion & " ----------" & return & return & "Renaming 500 folders took approximately " & time_dif_string & " seconds to complete."
end tell
I was alerted to this on another machine - a brand new Intel iMac - when I was rescuing a friend's photographs from his iPhoto Library. He had some corrupt files in his iPhoto Library and therefore iPhoto would not open. I used a program - a script - called iPhoto Library Extractor - it extracts all of the photos from a user's iPhoto Library and puts them all in a single folder (you can then reimport them back into iPhoto once it's done). This friend had 12,000 photos. I had used the same program with approximately 8,000 photos before and it only took about 10 minutes to complete. With 10.5.2 - the 12,000 photos took over 30 hours. I can only guess that all of this has something to do with how 10.5.2 is logging changes concerning the file system any time a lot of files are moved, renamed, or created.
Thanks,
Todd