Tip of the day - VIDEO SYNC w/o degrading performance
Chris Sellitto
sellich at guaranteedreturns.com
Fri Jan 13 11:09:54 PST 2006
>As I'm sure you know, filePro updates the screen only once a second while
>doing things like building an index or generating output. (Unlike what it
>used to do, which was update the screen every 100 records, which nowadays
>would be nearly continuously.)
>Also, there are times in your own code where you want the screen to be
>updated as you're doing things, so you put a VIDEO SYNC at places, to make
>sure that the messages are shown. However, doing so may also slow things
>down if you are forcing the screen to be updated rapidly.
>Here's a quick routine to get the screen updated, but only once a second.
>Rather than doing a VIDEO SYNC, call this routine:
> VidSync
> Then: Declare LastTime(8,hms,g)
> If: LastTime ne @tm
> Then: video sync ; LastTime = @tm
> Then: return
>Of course, there may be times you need to use VIDEO SYNC directly, but in
>the cases where it's not completely necessary (perhaps you have a loop in
>output processing, and you want the status to be updated to let the user
>know it's not frozen, as filePro won't force the update except between
>records), this subroutine could be quite handy.
I have been programming in filePro for over 11 years, and usually I just lurk in
the background reading this forum, but I would like to say thanks to Ken for
posting this very simple, yet very useful routine. I implemented it yesterday
for a process I run on a daily basis, and it worked great. There was
no degrade in performance whatsoever. So once again, I would like to say thanks.
It just goes to show that no matter how long you have been programming, there is
always something new to learn.
Chris Sellitto
VP Computer Operations
Guaranteed Returns
Long Island, NY
More information about the Filepro-list
mailing list