5 Replies Latest reply on Mar 3, 2015 3:19 PM by mark_scott

    Reducing number of objects on a layout : slide controls and tab controls

    binu.alexander

      I read an article here   FileMaker WebDirect | DB Services , that says that placing objects on slide controls can be used to decrease the objects on a layout and that will improve performance ..

       

      Can Tab controls be used in the same way  ? will it also help in reducing the time to load ?

        • 1. Re: Reducing number of objects on a layout : slide controls and tab controls
          wimdecorte

          There is some conflicting information around about this.  Using tab panels en slide panels may not have a performance impact because FM still loads the data in the background.  It does not do that for popup panels though, so those are more efficient.

           

          Avoid expensive unstored calcs and summaries on your layouts if they are not absolutely necessary.  If performance is a big deal then try to find out what is slowing things down.  Perhaps using narrower tables may help.

          • 2. Re: Reducing number of objects on a layout : slide controls and tab controls
            mikebeargie

            It WILL load your layout objects faster, as the screen is redrawn with every change (tab change or slide change).

             

            However as Wim mentioned, there's a greater performance increase by optimizing the table that is loaded via webdirect. I tend to try and avoid unstored calculations and summary fields completely whenever possible, in tables that are shown to webdirect.

             

            You can use 1-to-1 relationships to store heavy calcs and summaries for the desktop side in a separate table, then hide the joined heavy table from webdirect.

            • 3. Re: Reducing number of objects on a layout : slide controls and tab controls
              mark_scott

              Hey Wim,

               

              wimdecorte wrote:

               

              Using tab panels en slide panels may not have a performance impact because FM still loads the data in the background.

               

              Are you certain about this?  My understanding is a bit different.  This exact question (which, as you pointed out, has seen its share of conflicting info floating around) was addressed in 3 separate DevCon sessions last year.  Andrew Paulsen said that for objects on inactive tab/slide panels, FM loads the objects (their shells, essentially), but doesn't draw their views or fetch data until displayed.  He later said that (quoting reasonably closely from careful notes) "offscreen objects have less cost than onscreen ones, and inactive tab/slide panels or popovers have even less."  Then, Adam Ward reiterated the same thing in his session.  Finally, in the Performance Panel session, someone—may very well have been Andrew again, as he was on the panel—detailed the sequence for fetching data and rendering layouts:  visible parts and layout objects are loaded; views are created for those objects; FM skips building views for non-visible objects (e.g., on inactive panels); and, lastly, views are rendered back to front (in stacking order), fetching data for visible objects at that point.

               

              My take-home point from the 3 sessions was that inactive slide/tab panels and popovers all share a lazy loading model, and are essentially equivalent in the consequent performance implications.

               

              (Mind you, FM's "whole record at a time" data fetching approach still holds true, of course, so the main benefit would be for related data on popovers or inactive panels, provided no data from the related record(s) is shown on a visible part of the layout.)

               

              Mark

              • 4. Re: Reducing number of objects on a layout : slide controls and tab controls
                wimdecorte

                Mark Scott wrote:

                 

                Hey Wim,

                 

                wimdecorte wrote:

                 

                Using tab panels en slide panels may not have a performance impact because FM still loads the data in the background.

                 

                Are you certain about this?

                 

                Which is why I said there was conflicting information out there.

                 

                My own experience and what has been said at the "under the hood" sessions at DevCon" seems to be in line.

                However a lot of the confusion seem to be around unstored calc fields / summary fields on non-visible tabs, and the total # of fields in the table and

                - how many fields (all the data has to be loaded)

                - their nature (again unstored calcs / summary )

                 

                This is a complex matter and any one single example can seem to prove the point or disapprove the point.  There is no silver bullet here.  The more "expensiveness" you add to the table the harder it will be to hide it.  If you have 600 fields in your table there is no way that using tabs or slide panels will hide the pain.  If you have 40 fields but all of them are unstored calcs and summaries, then there is no hiding that pain when you use those fields on a layout.

                 

                This is not a simple matter with simple answers.

                • 5. Re: Reducing number of objects on a layout : slide controls and tab controls
                  mark_scott

                  Sounds like our understanding is in agreement (although I defer to your expertise on these matters, of course).  The DevCon-session comments re inactive panels and data fetching were really about whether one could delay loading related data if all such fields were hidden on inactive panels.  Of course, that related data might include not only 1:M child records, but also fields that have been farmed off into a 1:1 table to keep the current table narrow, thus another argument in favor of narrowing tables through this approach.  The caveat—an obvious one—that I remember being stressed a couple of times was that if even a single related field is on a visible part of the layout, then the entire related record is fetched (as per standard FM "whole record" fetching).  Thus hiding only some of the related record's fields on an inactive panel or popover wouldn't help performance.  Likewise, any unstored calc on the visible layout that needs that related data is also going to cause the entire related record to be pulled down at the time the layout is drawn.

                   

                  wimdecorte wrote:

                   

                  This is not a simple matter with simple answers.

                   

                  True 'dat! 

                   

                  Thanks for keeping us all on our toes on these design issues that can so affect performance, Wim.  I know it's an area that your comments and advice here touch on frequently, and with good reason.

                   

                  Mark