Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed of LOOP inside prg vs exe.
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Speed of LOOP inside prg vs exe.
Miscellaneous
Thread ID:
00594922
Message ID:
00594922
Views:
72
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
Map
View

Click here to load this message in the networking platform