qube99 Posted December 6, 2013 Posted December 6, 2013 I recently tested a few script methods for speed and thought I'd share what I saw. I have a FMP project that constructs a ternary tree database. I set up a design and ran it under varying circumstances in order to determine my best practices for this project. I am learning FMP and would like to know these things for all my projects. As a baseline I ran 2000 nodes of a single design. I looked at 3 main script parts. Times are in milliseconds No filter, no find, no print 1569, 1611, 1580 No filter, no find, with print 5446, 5512, 5473 about 4 seconds to print 2000 records 1x1. No filter, with find, with print 31970, 31940, 31936 That scripted find is a monster. Let's try to filter things. The data has to pass 2 tests. Filter A is a single if with 2 conditions in it and filter B is 2 nested if's for the same tests. With filter A, with find, with print 31616, 31609, 31638 With filter B, with find, with print 31648, 31680, 31667 It's a bit faster to use a single IF with logical AND for the 2 tests. And I wonder what the overhead for a frozen screen refresh is 0 Refresh 31648, 31676, 31667 1 Refresh 32607, 31895, 31862 Insignificant for my project. I can refresh as much as I'd like. Next I want to examine that scripted find and see what happens as the number of records increases. I'm also looking for a way to get field validation to return a boolean so I can see if that's any faster. Another avenue to look at is to print all the records and post-process duplicate removal. Maybe that's faster than using a scripted find.
jbante Posted December 6, 2013 Posted December 6, 2013 Rather than timing the whole script and comparing times when enabling and disabling different parts of the script, I've found it to be more helpful to time the different sections of the script separately. That way, I can see which part of the script is relatively slow with one test run total instead of one test run for each section under consideration.
Recommended Posts
This topic is 4004 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