Memory Problem?

Mark Schonewille m.schonewille at economy-x-talk.com
Sat Feb 3 13:14:04 EST 2007


Hi Peter,

Since Revolution uses AppleScript, a much better way to do this task  
is to open each file for binary read, open a destination for binary  
write, and use a repeat loop to read and write small chunks,  
something like 200K. When done, close both files and continue with  
the next. You will be surprised about the speed and if you include a  
wait command with messages in the repeat loop, you have still control  
over the GUI to show e.g. a progress bar.

Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Get your store on-line within minutes with Salery Web Store software.  
Download at http://www.salery.biz

Op 3-feb-2007, om 16:06 heeft Peter Reid het volgende geschreven:

> I've a program written in Rev 2.7.4 running under Max OS X 10.3.9  
> Server which copies 50+ backup files from one partition of a  
> FireWire drive to another using the revCopyFile command.  The size  
> of each backup file varies from 350Mb up to 7Gb.  During the copy  
> process a log is written to a text file, showing the start time of  
> the session, the details of each file copied and the end time of  
> the session.  Each file is copied one after another with the log  
> entry being added after each file has been copied.  The program  
> always copies all files and the log file is complete with both  
> session start and end time.  However, once the copying is finished  
> (taking some 90 minutes or so overnight), my Rev program is now  
> frozen, not responding to any mouse clicks or attempts to open any  
> of its menus (the Mac is otherwise working OK, no other problems  
> with any other running programs).  This means using the Apple menu  
> "Force Quit..." after every run of the program.  This program is  
> supposed to run in the background all the time monitoring other  
> activities and then doing the copying of the backup files  
> overnight, but can't be used this way as it's always frozen after  
> the copying!!
>
> I deliberately used the revCopyFile command instead of the put URL  
> command because of the advantages listed on the Rev help:
>
>> However, the revCopyFile command provides certain advantages. It  
>> copies file attributes (such as file type) and Mac OS resource  
>> forks along with the file. It also does not require reading the  
>> entire file into memory, so even extremely large files can be copied.
>
> According to the above from the help, memory shouldn't be a  
> problem.  However, the symptoms seem to be of a memory problem.
>
> Any suggestions please?





More information about the Use-livecode mailing list