Copy Speed Issues

I am sure most of you are aware about the DRM built into the file copy routine in Vista. In many cases it actully spends time checking to see if you have the "RIGHTS" to copy a file and thereby slows down file copy time. If you are not familar with it then take a look at it.slashdot.org/article.pl?sid=07/03/27/038227 - Anyway, My hope was that Opus would use a copy method that might be faster to get around the Vista issue. Is there any chance that Opus might have a faster copy routine that is not affected by this DRM garbage?

I'm not sure that the Slashdot crowd have correctly analysed the problem (there's a surprise!) - there's no DRM associated with normal files in Vista. But in any event, Opus doesn't use the Windows copy function and never has.

Vista's Explorer is indeed rather slow for some reason. The same is true for other programs which copy and delete files using the same shell APIs that Vista uses.

The good news is that Opus doesn't use the shell APIs for copying files. It never has because they've always been rubbish in one way or another (being really slow in Vista is just another reason to avoid them in a long list). Opus has its own copy routines built around the lower-level filesystem APIs instead of the higher-level shell API.

Deleting files is potentially a different story. If you have Opus set to delete to the Recycle Bin then it will use Explorer's delete API, because that's the only documented and reliable way to delete to the Recycle Bin. So that will be just as slow as Explorer, unfortunately. However, you can tell Opus not to use the recycle bin -- either by default or for individual deletes -- in which case it will call the lower-level filesystem API which is as quick on Vista as it was on XP.

I might turn out to be wrong but my suspicion is Explorer's slowness at copying and deleting isn't because of DRM. Why would Microsoft enforce DRM restrictions in Explorer yet make it trivial to "bypass" them by reading and writing files in the standard way? It seems pointless. Then again, DRM is pointless so maybe it is true.

That said, I have not yet seen an explanation of why Explorer and the shell API in Vista are slow at copying and deleting. The Slashdot article you linked claims they were tipped off by some readers that it's due to DRM but the two two old articles/threads Slashdot link to don't have any mention of DRM as far as I can see. (Maybe I missed a post? I didn't read it all in detail.) If someone has evidence/knowledge that the slowness is due to DRM then I wish they'd show it so we know for sure one way or the other. I mean, it might well be true. Vista sure is slow in this department and it's got to be doing something. It could also just be a stupid, unintentional bug, though.

Anyway, the bottom line is that it doesn't affect Opus when copying files and it only affects Opus when deleting files if you're using the recycle bin. (Even then, I've left the recycle bin enabled as deletes are usually instant anyway. It's only every so often that Vista seems to spend ages "calculating the time remaining".)

A lot of the DRM stuff is coming from Peter Gutman and DRM where he tells of horror stories related to how vista handles premium content, doing things like turning off sound drives and video when there is no DRM monitors. cs.auckland.ac.nz/~pgut001/p ... _cost.html

Anyway, the reason I made the post is that I was at a meeting of the minds yesterday and when they were complining about it, I said well Opus uses its own copy routines. They ran a few tests and had the same problems and speeds. It seemed that with some of the tests that the speeds were close to identicaly for 1-4 gig files and neither of them seemed to be fast.

I have not spent alot of time validating on my own, but today copying files 1.5 gig to 4 gig in size seemed to be about the same speed to me as well on my desktop.

I am not doubting you have your own code, but it seems Vista is ontrolling the read rights to the drives as well. If others can run thier own speed tests and see what thier results are, maybe we can get a verdict.

Anyone?

I've read the whole Peter Gutman article when it was released and I don't remember it mentioning anything about copying files.

(Parts of the article are interesting and somewhat worrying but parts of it also turned out to be verifiably incorrect. I think the article is interesting but its theories are not not particularly rigorous and weren't tested/verified. Vista does have some stupid DRM stuff in it, there's no doubt about that, but it isn't quite as bad as the picture that Gutman's article paints.)

Going back on topic, as far as I can tell Opus copies files on Vista as fast as my HDDs and network can read and write them.

If you're doing file copy tests, remember to ensure that the filesystem buffers get flushed -- by copying lots of other data -- between tests, else you end up with very skewed results. You'd also want to test on the same hardware (XP and Vista dual-boot machine). Even then, you may simply have worse motherboard/IDE/SATA/SCSI drivers on the Vista install which are slowing everything down. Or the disk may be fragmented... There are a lot of variables to discount before you can say for sure that one OS is slower than the other. As far as I can tell from my own experience, file copying in Vista (when not using Explorer, anyway) is no slower than it was in XP. (I haven't tried to test that, though, so I may be wrong.)