Andreas T. Posted January 25, 2007 Posted January 25, 2007 I am looking for a way to time portions of a complex script that involves several loops, in an effort to optimize the code. Is there a way to access current time milliseconds on FM? An Applescript would also work for me. What I would like to do is to assign elapsed time to variables in key places in the script, sort of a benchmarking function. Cheers, Andreas
Inky Phil Posted January 25, 2007 Posted January 25, 2007 I am sorry Andreas, I cannot help you with your question because as far as I am aware FM only goes down to single units for seconds. I am curious though, if you want to go down to milliseconds does it really matter (in fm terms)? If the differences are so small what would be gained? Also, I suppose that if you really wanted to test to the millisecond why not multiply the number of records that you are looping through by factors of 1000 and then do the maths. Or possibly even loop 1000 times more often. Forgive me if none of this is helpful. I am just thinking out loud (..erm in my head...) if you know what I mean Phil
Andreas T. Posted January 25, 2007 Author Posted January 25, 2007 Your point is well taken, Phil. I suppose the way to do it would be to multiply the number of records up to a number that makes seconds significant and loop the script. Can't help wondering why I didn't think of that. Thanks for the help. Cheers, Andreas
Søren Dyhr Posted January 26, 2007 Posted January 26, 2007 I have a personal rule, and goes this way if a script gets bothersome to await the completion of, is it most likely to blame an inadequate relational structure underneath. By and large are the creation of real records, going to take much more time than changing a multilinekey, unless a employed CF have too many iterations/recursions to await competion. The CF's do better being short iterated and split over several keyvalues in a multicriteria relation each responding during the typing... http://www.clevelandconsulting.com/support/viewtopic.php?t=664&start=0&postdays=0&postorder=asc&highlight=multi+criteria So if you in anyway can avoid getting statistics from a join-table, the ditch it and turn towards CF's and multiciteria keying. BTW does the need for event-triggers evaporate ...at least for this task. --sd
Recommended Posts
This topic is 6513 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now