7 Replies Latest reply on Apr 26, 2016 10:35 PM by bigtom

    High speed record creation?

    bigtom

      What is the fastest known way?

       

      Currently I am creating records on a layout with:

       

      Loop

      New Record

      Set Field[1]

      Set Field[2]

      Set Field[3]....

      End Loop

       

      I read at one point some people using a system where they import from a "bank" of blank records and then update them with a loop. They claim this is faster. Is it?

       

      Loop

      Go To Record [Next]

      Set Field[1]

      Set Field[2]

      Set Field[3]

      End Loop

        • 1. Re: High speed record creation?
          wimdecorte

          For pure record creation speed, almost nothing beats importing from a text file.

          In your case setting the fields may be the thing slowing it down.

           

          One thing you can investigate is to use auto-enter calcs that take a value from a local variable.  That way your script does not need to do all the Set Fields.  The "New Record" will do all the work.

           

          Kinda depends on how static the data is that you are setting...

          1 of 1 people found this helpful
          • 2. Re: High speed record creation?
            TomHays

            Instead of modifying the fields to use auto-enter calcs that use local variables, you might try importing from a virtual table (table of calculated fields that pull from local variables).

             

            This should accomplish the same thing without needing to change anything in your destination table.

             

            -Tom

            1 of 1 people found this helpful
            • 3. Re: High speed record creation?

              Agreed.

               

              I either write my own data generator logic or use the free and quite flexible data generation tool called "Randommite". Randommite will generate up to 9,999,999 rows of names, dates, custom fields, etc.

               

              Then, I let FileMaker import those.

               

              Script performance is very slow compared to the import method from my tests.

               

              HOPE THIS HELPS.

               

              - m

              • 4. Re: High speed record creation?
                bigtom

                Thanks guys. I appreciate it.

                • 5. Re: High speed record creation?

                  Sure, you bet.

                  • 6. Re: High speed record creation?
                    bigtom

                    wimdecorte wrote:

                     

                    One thing you can investigate is to use auto-enter calcs that take a value from a local variable. That way your script does not need to do all the Set Fields. The "New Record" will do all the work.

                     

                    Kinda depends on how static the data is that you are setting...

                    I used the auto enter calc from local variable and shaved 7% or so off of the record creation time vs set field.

                     

                    I gave a shot at having the auto enter calc being the calc itself. Basically skipping the variable step all together as well. New Record does the calc, not the script. My first test showed it was slower, but I will keep working on it to confirm.

                    • 7. Re: High speed record creation?
                      bigtom

                      It seems that there is a pattern where double the CPU cores will double record creation speed. Is this correct? I do not have an 8 core machine on hand for local testing. FMP does not seem to use virtual cores for record creation.