5 Replies Latest reply on Nov 26, 2012 9:53 AM by BruceHerbach

    v12 New window script step gets slower over time

    perren

      Just spent some time wrestling with a performance issue we're having since the v12 update. All the details, data and example files are here: http://www.drbott.net/blog/?p=1205

       

      Thanks,

       

      --Perren

        • 1. Re: v12 New window script step gets slower over time
          gdurniak

          Did you try graphing the results for FileMaker 11 ?  I wonder if it's the same, just less noticeable

           

          It is possible there is a memory leak

           

          Didi you check the Activity Monitor ( Task Manager ) before, and after ?

           

          greg

          • 2. Re: v12 New window script step gets slower over time
            DavidJondreau

            Hey Perren,

            It's been a few months since the front of the Fontainebleau!

             

            Your blog post raises a couple questions for me...

             

            Your end time is after the Close Window[]. Could that be influencing the results?

             

            Have you tried different window styles, or sizes?

             

            I never use more than one New Window[] in a script, to get off the user's context, then switch to empty layouts at will in that one offscreen window. Under what circumstances does your team use multiple ones?

             

            Good luck with this!

             

            David

            • 3. Re: v12 New window script step gets slower over time
              perren

              Yes, FM11 is .13 seconds, no matter the amount of iterations. It doesn't have the same behavior as 12.

               

              There is increased memory usage as the iterations pass, but not enough info to go on to point to a true memory leak. I'll leave that to the FMI engineers to tackle.

              • 4. Re: v12 New window script step gets slower over time
                perren

                Hi David,

                 

                Yes, the end timer is after the close window. I discovered this by way of triaging deployed code - when I was capturing timing there the close window has no effect. It stays put around .002 seconds.

                 

                Differing styles, window positions (on/off screen) and sizes have no effect.

                 

                We typically never use more than one window per script, but some of our core scripts will have many child script calls all potentially with their own window. For instance if I'm building an invoice I might need to query the customer account balance, compute shipping and decrement inventory for each line item. These can add up over time as we tend to code in a pretty modular way.

                • 5. Re: v12 New window script step gets slower over time
                  BruceHerbach

                  Back in version 11,  I was working on a solution that had to duplicate a set of records based on a Hierarchy. The original setup would open and close quite a few windows as it worked through the hierarchy.   In doing a timing analysis, I found that opening and closing large numbers of windows was an issue. I was able to change the way the script worked so that it used one off screen window opened at the start and closed at the end of the script.  This produced a significant improvement in execution time even in 11. 

                   

                  Going back to the article,  do your users leave FileMaker open over night?  I can see from the graph,  that over time it takes longer to open and close the windows.  Still it looks like they have to open and close about 2500 windows or so before they time increase starts to become noticeable.