Mac OS X’s Finder: Clumsy copying process for large folder replacing an existing one

Posted by Pierre Igot in: Macintosh
September 1st, 2005 • 2:54 pm

We all know that Mac OS X’s Finder is a pretty lousy piece of software. But sometimes it helps to describe specific problems in detail. Here’s one problem that I encounter on a regular basis and where there is lots of room for improvement.

I frequently copy my entire “Mail” folder (the one that contains my complete archives of e-mail messages from the past 10 years or so) to an external hard drive as a form of backup. As we’ve seen before, with Mac OS X 10.4, the number of files inside this folder has increased significantly, because now each e-mail message is saved as an individual file.

In my case, after upgrading to Mac OS X 10.4, this folder’s size more or less doubled. (It is now close to 600 MB.) But the number of files it contains went from a few hundred or maybe a thousand or so (I can’t remember exactly) to over 60,000 files.

One of the problems with this is what happens when I try to copy this folder with its 60,000 files. Whenever you copy a folder in the Finder, Mac OS X first goes through a quick scan of the contents of the folder, and then starts copying the folder and its files. But if you copy the folder to a destination where a folder with the same name already exists, Mac OS X has to display a dialog asking you to confirm whether you want to replace the existing folder with the new one or not.

The problem is in the sequence in which these events occur. When you drag a folder to a destination, instead of checking the contents of the destination to see if a folder with the same name already exists and displaying the warning right away, Mac OS X first goes through the process where it scans the contents of the folder you are trying to copy. It only displays the dialog asking you to confirm that you want to replace the existing folder with the one you are dragging after it has scanned the contents of the folder.

In the case of a folder only containing a few hundred files, that’s not really a problem, because the scan of the folder’s contents is very quick. But in the case of the “Mail” folder, with its tens of thousands of files, that’s not quite the case! The scanning process takes quite a while, and the user has to wait until that process is complete before the dialog asking to confirm the copy operation actually appears, requiring the user’s feedback.

This is quite clearly an inappropriate sequence of events. The dialog should appear right away, and the scanning process should take place later. (After all, if the user does not want to replace the existing folder, the copy operation will be cancelled anyway, and the scanning process will have served no purpose whatsoever.)

And that’s not all. Even after the dialog asking the user to confirm the replacement has appeared and the user has confirmed it, the copying process itself does not begin right away. Or rather, the Finder goes through what looks like yet another scan of the folder’s entire contents.

In other words, when I try to copy my “Mail” folder with its 60,000 or so files to a destination that already contains a folder called “Mail,” here’s what happens:

First Mac OS X displays the copy window with a message saying “Preparing copy to…” and a candy bar animation:

Copy Process - Phase 1

Underneath the candy bar animation, there is a counter indicating the progress through the 60,000 or so files. This takes quite a while.

Then when this scanning process is finally over, I get the dialog asking me to confirm whether I want to replace the existing folder with this one, and I confirm. What I get next is this:

Copy Process - Phase 2

It looks like it’s the actual copying process itself, but it is not. The Finder goes through all 60,000 files or so once more, all the time saying, “Estimating time remaining…,” but it doesn’t actually copy the files. After it has gone through all 60,000 files, it shows this:

Copy Process - Phase 3

And now it goes through all 60,000 files a third time, this time finally actually copying them, as indicated by the progress bar and the actual time estimation that finally appears.

This is really quite clumsy. Instead of all this, we should have a process that goes like this:

  1. As soon as I drag my “Mail” folder to its destination, the Finder should display the dialog asking me to confirm that I want to replace the existing folder with this one.
  2. As soon as I confirm this, the Finder should show a single progress bar animation with a file countdown, and complete the copying process.

That’s it. Only two steps. This is all that I, the user, should ever see. I shouldn’t have to wait for the Finder to go through its initial scanning process before the confirmation dialog appears. And I shouldn’t have to go through two countdowns before the actual copying process. As a user, I shouldn’t have to see things that are effectively traces of the inner workings of the file copying process. As a user, all I am interested in is the stuff that affects me, and not how the copying process actually works.

I realize that there are physical limitations in the way hard drives and Mac OS X work that probably make the two preliminary scanning processes necessary. But that doesn’t mean I should see them. And it certainly doesn’t mean that the only step in the copying process that requires interaction with the user should be sandwiched between two of these processes.

The Finder should be smart enough to show me the dialog first, and then display a single process (not three of them), with a proper progress bar and a reasonably accurate estimation of the time remaining. That’s it.

(N.B. I realize that I said above that my “Mail” folder weighs close to 600 MB, when the screen shots above indicate that it weighs 478.8 MB. What can I say? When I select my “Mail” folder and do “Get Info” in the Finder, it tells me that the folder size is “595.4 MB on disk (502 107 42 bytes).” So is it 478.8 MB, 502 MB, or 595.4 MB? I know there is something about megabytes being 1000 bytes vs. megabytes being 1,024 bytes — but surely the Finder should be consistent with itself!)

2 Responses to “Mac OS X’s Finder: Clumsy copying process for large folder replacing an existing one”

  1. Hes Nikke says:

    A better streamlined process would be to scan the contents of the folder, and ask the user to confirm replacement AT THE SAME TIME. then the user can feel like the copy is going quick, when in reality, it’s still the same sluggish copy operation that it does now.

    As far as the different sizes are concerned, my guess is that it probably has something to do with minimum block size… each file may have 4 kilobytes of data in it, bit it’s not possible to have files smaller than 64 kilobytes, so each file appears to be 60 kb bigger than it actually is – or at least in some places…

  2. Pierre Igot says:

    Yup, good idea about multithreading the whole thing, although I suspect it still wouldn’t be fast enough to complete while the user confirms. But the Finder should definitely make better use of the system’s multithreading capabilities. Still, the main thing would be to reduce the three processes to only one, at least in the eyes of the user.

    As for block sizes, I thought that was one of the things that HFS+ remedied… When I check individual mail messages, it looks like, on my partition at least, they have a minimum size of 4 KB.

    Still, it doesn’t make sense for the Finder to display two different sizes for the same thing in two different places.

Leave a Reply

Comments are closed.