Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Multi-process

From: louisaturk:coxinet at: 1-Nov-2002 14:04

Gregg,, At 12:07 PM 11/1/2002 -0700, you wrote:
>Hi Louis, > ><< In a certain script I must manually insert data then save the file. The >file is huge and takes over two minutes to save, while I just sit there >looking at the screen. >> > >Is there any processing going on while it's saving, or does it take that >long just to write raw data?
Well, I didn't think about it when I made the post, but there is some processing going on. Perhaps you can see a better way that will speed things up. Here is what is happening: start: now/time append buffer/text "Saving..." show buffer if exists? %i-8.bak [delete %i-8.bak append buffer/text "deleted %i-8.bak...renaming %i-8.txt to %i-8.bak..." show buffer] rename %i-8.txt %i-8.bak append buffer/text "saving memory to %i-8.txt..." show buffer foreach line lines [ write/append %i-8.txt join line newline ] append buffer/text "backing up to %/c/i-8.txt ... " write %/c/i-8.txt read %i-8.txt ;print "backing up to %/f/i-8.txt." ;write %/e/i-8.txt read %i-8.txt finish: now/time backup-2-disk-time: finish - start log-string: join now/date join " " join backup-2-disk-time " (hours:minutes:seconds) were spent backing up data to disk." append buffer/text rejoin [log-string newline] show buffer write/append %word-study-log.txt join log-string newline append buffer/text rejoin ["DONE: backing up to disk took (in hr:min:second): " backup-2-disk-time] show buffer
>How large is the file?
8 MB
><< How can I save to a separate process so I can immediately get back to >data >entry (the manual data entry itself takes over two minutes, so there is no >worry about saving before the previous save is completed). > >Is Rugby a solution? or does Rugby not work on a stand alone computer? >> > >You could use Rugby, or a simple TCP client/server system.
How? Many thanks, Louis