Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Sep 15, 2019 9:17 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Large File Copy Performance Tips
PostPosted: Mon Jan 31, 2011 10:36 pm 
Offline

Joined: Tue Apr 17, 2007 12:09 am
Posts: 10
Hi, we have to copy large .vhd files (3-6Gb) from one location or usb external drive to another location in the c: drive, while displaying a progress bar or something to show the end user that it is processing.

We have found sever al posts recommending to use folderitems and CopyToFile and others suggesting BinaryStreams.

In terms of performance for our files, which method would you recommend?

Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Large File Copy Performance Tips
PostPosted: Mon Jan 31, 2011 10:40 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
CopyFileTo doesn't allow you to show progress, so the choice seems clear. Use a BinaryStream in a thread. Yield time often enough to keep your progress indication responsive.


Top
 Profile  
Reply with quote  
 Post subject: Re: Large File Copy Performance Tips
PostPosted: Mon Jan 31, 2011 10:51 pm 
Offline

Joined: Tue Apr 17, 2007 12:09 am
Posts: 10
Thanks for the tip. When you mention about the Yield Time Often, exactly what are you referring to?


Top
 Profile  
Reply with quote  
 Post subject: Re: Large File Copy Performance Tips
PostPosted: Tue Feb 01, 2011 5:38 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
Our plugins have classes like MacFileOperationMBS and WindowsFileCopyMBS which give you progress updates.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Large File Copy Performance Tips
PostPosted: Tue Feb 01, 2011 8:55 am 
Offline
User avatar

Joined: Fri Nov 10, 2006 4:10 pm
Posts: 1855
Location: Michigan, USA
neogenesys wrote:
Thanks for the tip. When you mention about the Yield Time Often, exactly what are you referring to?
When setting the thread priority, don't raise it to such a level that it doesn't allow for the UI to update properly. If you raise it too high, then it won't yield enough time for the UI to update and remain a reliable feedback of the progress.

Hope this helps! :)

_________________
Windows 8 x64
Windows XP Pro SP3
Ubuntu 11.04 via Virtual Box
RS Enterprise 2012r1.1

Programming Tutorials & Free Projects: http://www.JasonTheAdams.com
"Christianity has not been tried and found wanting; it has been found difficult and not tried." - G.K. Chesterton


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group