8 Replies Latest reply on Jan 16, 2014 2:25 PM by keywords

    Slowness when switching layouts

    jsorge

      I'm working on an app that has a particular layout that is really slow (talking in minutes) when switching away from it. There's a script trigger that runs, but it's common to many of my layouts and isn't the culprit. In the actual step to go to the new layout is where things hang up. So my bigger question is, what is happening when switching a layout? Are there other dependencies that are slowing something down that I'm not aware of?

       

      I can give more details, but I'm not sure which ones are necessary. I just want to get the conversation started. Thanks!

      jared

        • 1. Re: Slowness when switching layouts
          CarlSchwarz

          Have you tried walking through it with the script debugger and seeing which step is slow?

          • 2. Re: Slowness when switching layouts
            keywords

            It sounds, from what you say, that the delay is associated with the layout you are going to, rather than the one you are leaving. I suggest you temporarily change your script to go to a new, empty layout instead of the one currently in the script. If that loads without delay you can start analysing the layout that is causing the delay. There you can make a copy so you can reinstate if there is no problem, then start deleting layout elements and see what improves things. I also concur with Carl's suggestion of stepping through ther script first.

            • 3. Re: Slowness when switching layouts
              Mike Duncan

              What version of FileMaker? In 13 there are some steps you can take to clean up a layout with styles that will help performance.

              • 4. Re: Slowness when switching layouts
                jsorge

                Hey guys,

                Thanks for the responses. I'm running FileMaker 13 on Mavericks, and on Windows 7. Here are some of the steps I've taken:

                • I have gone through debugger and the step that's slow is Go To Layout.

                • I've tried switching the layout that I'm going to, and the destination seems not to matter. It is hanging on that step only.

                • I've done a test and it doesn't matter what TO the destination layout is associated with. It's just slow.

                 

                The script that's running was being triggerd by an OnObjectSave on a checkbox, and I think the script itself is fine. The slowness is actually in committing the record that I'm leaving. So I guess my next question is what happens when a record is committed? What dependencies should I be checking on there? I've got 3 portals on the layout, and like I said originally the TO that the layout is bound to has quite a few ESS relationships that get crawled for things like conditional formatting. Could that be the culprit?

                 

                Thanks for the help!

                jared

                • 5. Re: Slowness when switching layouts
                  jormond

                  That is most definitely part or all of the problem. ESS commits can sometimes slow things down. Depends on the path between you and the remote db.

                  jsorge wrote:

                   

                  I've got 3 portals on the layout, and like I said originally the TO that the layout is bound to has quite a few ESS relationships that get crawled for things like conditional formatting. Could that be the culprit?

                  • 6. Re: Slowness when switching layouts
                    jsorge

                    I had a feeling that might be the issue. So I've gone ahead and brokend all of the relationships to the ESS tables, and the commit is still dog slow. Is there any low-level documentation that outlines what happens during a commit? I must be missing something somewhere. Thanks!

                    jared

                    • 7. Re: Slowness when switching layouts
                      jsorge

                      I found where the problem was happening. I had been writing audit logs for the parent table and its child table on commit, and that was proving far too costly. Disabling them made everything super snappy. That was a failed experiment. The ESS had nothing to do with the slowness. Thanks everyone!

                      jared

                      • 8. Re: Slowness when switching layouts
                        keywords

                        Glad to know you found the problem. So we have audit logs and audit logs, eh! Best investigate other ways by the sound of it. For a starter, I have found Ray Cologon's Ultralog (http://www.nightwing.com.au/FileMaker/demosX/demoX01.html) suits my requirements and I've never noticed any performance isssue with it.