Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed of LOOP inside prg vs exe.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00594922
Message ID:
00594923
Views:
26
>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.
>
Is it possible that the table you're adding record into, is open exclisively in the program and shared in the exe?
Are you using the same program in the exe and outside?
Would result change if you run exe under VFP?
You can use coverage profiler to see wich part of code is responcible for slowdown.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform