Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
90 milliseconds to call simple function
Message
From
08/05/1999 15:12:41
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
90 milliseconds to call simple function
Miscellaneous
Thread ID:
00216437
Message ID:
00216437
Views:
65
I was testing a simple date function from the command line and there was a noticeable pause before the result showed. I did some checking and it seemed that it took about 90 milliseconds for the function to execute. The code within the function required only about 1 ms to execute, however.

I noticed that if I copied the function code into the test program that the time to call the function dropped to 1 ms. This led me to try copying the function FXP file into the default directory. This also resulted in a 1 ms execution time.

If I leave the function in the remote directory where I store all of my general functions and place the call in a loop, the time to execute remains 90 ms for each call.

I'm assuming that if I placed my test code in a project and built an EXE file that the function would be copied into the executable file.
But I'm not in the habit of doing this for temporary programs like file conversion programs. Some of these conversion programs operate on 100,000+ records so a 90 ms delay for each record (and there could be many more than one function call) would add 90,000 seconds or 150 minutes to the run time.

I'm going to experiment with copying all of the needed functions into the directory where I do the conversion runs. But I am surprised that VFP doesn't buffer these functions in some way.

Peter Robinson
Peter Robinson ** Rodes Design ** Virginia
Next
Reply
Map
View

Click here to load this message in the networking platform