General information
Category:
Coding, syntax & commands
Title:
Speed of LOOP inside prg vs exe.
I have a loop that does the following:
1) Calls a COM Server which returns an address record
2) Does a SEEK on a local table to see if the returned address is already in the table.
(the index and seek are in the form “lcA+lcB+lcC+lcD”)
3) If the address record is not found, it adds it to the table using APPEND BLANK and REPLACE.
In the test the loop is executed 256,000 times eventually adding 17,000 records to the table.
If I run this loop from within a prg it takes 24 seconds. If I run this exact same loop from within a compiled exe it takes 8 minutes!
To make the test as similar as possible I put in a CLOSE DATABASES ALL right before the loop but there was no change in the results. What could explain such a huge descrepency in time? The only thing that I haven’t done is to close the main menu, two small text only forms, and release any memvars which may number 30 or so.
Any suggestions for a fix would be greatly appreciated.
Ed
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only