Live UDF slow and buggy
In the following, I am comparing the Live UDF of Vista to Windows XP SP 2 with Roxio Drag-to-Disc version 8.0.5.23. The following tests are done on the exact same hardware, and using the same files. I have XP and Vista build 6000 installed on two separate partitions of the HD. This should serve to suggest that all of the following differences are due to software only, and not hardware or other factors.
Two bugs :
1) I insert a CDRW and open Windows Explorer, and select Erase Disk. When I press the OK button to begin erasing, Explorer and the progress window both close, and the erase apparently is not being done... Launching Explorer again and trying the same thing again seems to work. This bug also existed in Pre-RC1 build, and seems to continue in build 6000.
2) Following the test below (copying a file to a formatted CDRW), the disk cannot be ejected. A dialog appears saying the drive is in use with open files, cancel, try again, or continue. There seems to be no way beyond this point. The disk cannot be ejected. Something seems hung, apparently with open file handles. There is no IO to the CDRW disk. There should be no apps running that are using this disk. But the disk won't eject...
Two observations :
1) Live UDF seems to be a lot slower than Roxio. The test below will show this.
2) The formatted size of a CDRW disk is quite a bit less when Vista formats it than when Roxio formats it. Details of this also below.
The above issues, together with the bugs, gives me the impression that Live UDF is not yet stable, and has a ways to go to catch up with Roxio.
Ok, and now the test specifics.
The test was run with a 650MB 10x CDRW disk. This same disk was used in all tests. The disk, when used in XP, is formatted by Roxio, presumably to UDF version 1.5 (this is what the app says it is using, but I have no way to confirm). In Vista, I format with Vista and also select UDF 1.5 to attempt to remain equal.
Formatted by Roxio, the capacity of the disk is 560,726,016 bytes. Formatted by Vista, the capacity is 507,236,352 bytes. This is a difference of about 10%, which is significant.
After formatting is complete, a single large file is drag-and-drop copied to the CDRW using Windows Explorer. The size of the file is 398,567,532 bytes. This file is on a local HD in the system.
With Roxio, this copying takes 5:00, from the time the file is dropped, until the time the copy progress dialog closes. Expecting that there is some buffering going on, I also eject the CDRW, to force flushing, etc. It takes the Roxio app about 0:30 to respond to the Eject request, which suggests that the flushing is taking place at this time. The eject then takes 0:10. So, total time from file drop to disk eject is 5:40.
With Vista, the copying takes 7:37. As mentioned above, the disk could not be ejected. Therefore, I also don't know how much additional time would be spent in post-copy flushing. I assume therefore that the total time would likely be longer than 7:37. Assuming the same 0:30 flush and 0:10 eject that Roxio takes, this would give a total time of 8:17.
Using these times for comparison, Roxio performs the same job in 68% of the time it takes Vista. This again is significant.
It should also be noted that eject was done without closing the file system.
I have written an app that performs a similar type of operation to the above test, and it runs VERY slowly on Vista, which is why I've done the above to try to find a much simpler way to demonstrate the issue. However, my app runs much more slowly than the above test, and this is somewhat of a mystery too.
Basically, my app starts with an empty CDRW disk, opens a file, and writes into it appending until the disk is full. This file write is sector aligned, unbuffered, begins at offset 0, and occurs with 1MB sized writes. I have built this app using VC6 on XP, and VS2005 on Vista. This app operates at a fast speed when running on XP and Roxio. But on Vista, it's extremely slow. I have not yet timed this exactly, but my rough estimate is that it takes about 3 or 4 times as long on Vista as is does on XP and Roxio. There is no difference in the code between XP and Vista builds, only the compiler used to build it is different, as mentioned.
This speed difference is puzzling, as it suggests that something I am doing in my file write IO is very inefficient, much more so than what Explorer is doing. But what could be so inefficient about sector aligned unbuffered 1MB writes ? And, as I said, there is no slowness when doing this with Roxio. With Roxio, my app takes the expected time to fill the CDRW, bascially, approximately the same time it would take to to a mastered write (about 8 minutes or so for the 650MB 10x CDRW media). With Vista, it takes somewhere around 27 minutes to do the same thing.
In watching the CDRW disk IO pattern via the acitvity light on the optical drive, it's easily apparent that Roxio and Vista behave differently. In Roxio, the activity light continuously blinks in a constant rhythmical pattern indicating continuous writing. This pattern is unbroken and very stable, during the entire file copy process mentioned above. To the contrary, in Vista, the activity light alternates between writing and reading, over and over. This suggests that perhaps read after write is taking place, or that some other kind of IO is happening during the file write. This obviously slows things down, and, if one uses Roxio as example, is not necessary.
I can attempt to write a small app that demonstrates this, if necessary. Please advise if there is anything I can do to improve this slowness. Thank you.

