6 Replies Latest reply on Oct 24, 2012 12:22 AM by misham

    Scripted got to Layout vs. Button go to layout performance issues in FM12

    wrwaugh

      Perhaps it is just me and the way I have built my database, but I have an issue that I want to know if others have seen.

       

      If I have a button on "Layout 1" that is set to Perform Script, and said script is simply: Go to Layout [Contact Details (Contacts)]. It takes as much as five seconds and no less than 3 seconds to complete.

       

      However, if the button on layout 1 is set to Go to Layout and the layout is Contact Details, it takes less than 1 second.

       

      I am stumped. I confess that on the layout Contact Details I am using a Theme of 'River' which I have modified rather severly and I have a tab control with 10 tabs, but I don't see how I get there should make a difference.

       

      Any Ideas?

        • 1. Re: Scripted got to Layout vs. Button go to layout performance issues in FM12
          wrwaugh

          I should add that my original deisre was to have a script that would take me to the Contact Details layout, and then to a desired Tab Control tab via a Go To Object script step.

           

          My workaround (to avoid the slow down I am experiencing with a script taking me to the layout) is to use the Go to Layout on the button, and tehn have a script trigger on the layout that runs a simple script of Go to Object [$$Tab]  on layout entry.  Total time for button and Script trigger is less than one second.

           

          Time for a button set to Perfor Script that includes the two steps of  Go to Layout  and Go to Object is 5 seconds.

           

          I feel so confused.....

          • 2. Re: Scripted got to Layout vs. Button go to layout performance issues in FM12
            reelsteve

            You wrote the name of the target layout slightly different in describing button with script versus button assigned to goto layout.  I'm assuming that u r saying that the two buttons , one which goes to layout via the goto layout script step, and the other - Using a script with a single script step (goto layout), have the identical target layout yet require different times to do the job, the script taking longer.

            Sounds like possible demonic possession !

            All things being equal, there should be no diff.

            Try taking the two suspect buttons off the layout and paste them into another layout.  Reassign them to a different target layout and see if the problem has followed.

            Back at the original crime scene layout, create a couple of new button objects and see if the problem persists.

            That will help u zero in a bit more.

            • 3. Re: Scripted got to Layout vs. Button go to layout performance issues in FM12
              wrwaugh

              Reelsteve,

               

              I took your advise and tested several variations.  The end result is that I was wrong as to the cause of the problem.  It was another script step I had not removed.   I now know what is really going on.  Here is the new senario:

               

              Layout = "Test"

              Tab control with two tabs, "One" and "Two"

               

              Script 1:

              Go to Layout ["Test" (Test)]

              Go to Object [Object Name: "Two"]

               

              Works great.  takes me to the correct layout and to the correct tab.

               

              Script 2:

              Go to Layout ["Test" (Test)]

              Go to Object [Object Name: "Two"]

              Show/Hide Text Ruler [Toggle]

               

              Goes to the layout, but does not seem to trigger the Go to Object step.  Actully it does, but by putting the Show/Hide step after the Go to Object step causes the focus to go to the Default Front Tab in the tab control (tab "One").

               

              So I put the Show/Hide step before the Go to Object ste[p and it works.  So I investigated the Show/Hide Text Ruler script step which was in the original problematic script.

               

              Filnal Result:  It is the Show/Hide Text Ruler [Toggle] step that causes the long delay.

               

              The delay does not occur when going to a "simple" layout.  The one with the 10 tabs in the portal seems to be the problematic one.  Perhaps this is because there are so many text fields that the Text Ruler applies to?  I surely don't know.

              • 5. Re: Scripted got to Layout vs. Button go to layout performance issues in FM12
                wrwaugh

                After installing 12.v3 showing the text ruler still causes a two to three second delay.  This is true whether one uses a script step or just goes to the menu and selects View >> Ruler. 

                 

                Why FM takes so long to show a ruler I don't know.  I also made a copy of hte offending layout and changed the theme to classic.  On this layout showing the ruler took about 1.5 secs as opposed to the original layout in River Theme wherre it took about 2.2 seconds. 

                 

                Don't konw why... I will avoid the ruler for now.

                • 6. Re: Scripted got to Layout vs. Button go to layout performance issues in FM12
                  misham

                  Do you know by changing themes in the layout you are unnecessarily increasing the size of the file by several mbs. So it is advisable to experiment themes in some test db and then select the final theme for the real db. Well, you can consider changing the themes so many times, to be a part of the slowdown.