On 8/18/2006 2:59 PM, Norman Palardy wrote:
> 
> On Aug 18, 2006, at 12:50 PM, Charles Calvert wrote:
> 
>>
>>> And, since it is a thread of your own design it's possible to get some
>>> feed back on how much has been copied; something not possible with
>>> CopyFileTo.
>>
>> Sorry, but I thought you were suggesting that I use CopyFileTo to copy
>> individual files inside my worker thread.  Do you mean that I can get
>> feedback because I'm using separate threads (and thus can push progress
>> info back to the GUI via events, etc.) or because I would replace
>> CopyFileTo with an API call?
> 
> Actually you can copy files entirely in RB code without using CopyFileTo
> so you can hook in any kind of progress you'd like as you code runs.
> And you can still copy files very quickly this way

By opening the files in binary and just reading/writing the raw bytes
using the BinaryStream class or something similar, I presume.  Will that
copy the data fork only, or both the data and resource forks?

> As fast as using an API directly ? ... unsure ... I'd suspect the API
> would have some performance advantage.

I would guess so too.  Can you point me to a piece of sample code that
shows how to use the API functions, preferably ones that don't mangle OS
X-compliant filenames?  I Googled the web and searched the list archives
and didn't find one.

> But when you want/need some means to provide user feedback you may need
> to do a slightly slower copy with user feedback.

I'm okay with that, as long as the performance isn't hugely different
from what you get with Finder or ditto.

> But, I have copied several million files for one client this way and the
> biggest bottleneck doing it in a large number of threads does seem to be
> drive performance. We had to put a cap on the number of active threads
> to keep from flooding the drive array and network cards between two file
> servers.

Okay, thanks.

-- 
Charles Calvert
Celtic Wolf, Inc.
(703) 580-0210
[EMAIL PROTECTED]
http://www.celticwolf.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to