Tip of the day - VIDEO SYNC w/o degrading performance

Kenneth Brody kenbrody at bestweb.net
Thu Jan 12 09:31:20 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.

-- 
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody        | www.hvcomputer.com |                             |
| kenbrody/at\spamcop.net | www.fptech.com     | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>



More information about the Filepro-list mailing list