8 Replies Latest reply on Jul 14, 2017 4:31 PM by justinc

    More performance issues: scrolling and the drop-down showing 2nd value

    justinc

      Hey all,

      I have posted previously about trying to improve the performance (both loading time and scrolling responsiveness) of a various layouts.  I have some basics that I'm aware of (local fields, no unstored calcs, etc) but I ran across something today that really surprised me.

       

      This is all done in FMPA 15.03.

       

      I have a field for picking a category that something is assigned to; I've been using a pop-up list as the UI object.  This is defined to use a value list that stores the ID, but only shows the 2nd value.  Pretty common setup I think.

       

      I discovered today that putting this field/object on the layout would cause a noticeable lag in the scrolling responsiveness, though.

           Field/object off layout = smooth and fast

           Field/object on layout = hitchy, medium-fast speed

       

      I had started the day by redoing this layout:  I created all new T.O.s and new related tables.  I.e. new anchor and buoys...because this system is not using anchor-buoy previously - so I wanted to try it out and see how it would affect the performance.  I still wasn't real happy when I got things all repointed to the new T.O.s, so I started another new layout and just started putting 2 or 3 fields/objects on it at a time.  I was really surprised when I put this pop-up menu on the layout and saw such a noticeable hit in the scrolling performance.

       

      The field is local to the table.  I did create a new Value List for this new context.  The relationship to the value list's context is a simple tableA::ID = tableB::field_fk.  The number of related records is small, < 10.  This related table isn't real wide (41 fields).  Both fields are indexed and static non-calculated values.

       

      If I put just the field as an edit box (not as a pop-up), then it scrolls fine.  If I put the pop-over on the layout and change the value list to show only the ID, then it scrolls fine.  But using a 2nd value causes a real-noticeable lag.

       

      Has anyone else noticed this?  Or what am I doing wrong?

       

      Thanks,

      Justin

        • 1. Re: More performance issues: scrolling and the drop-down showing 2nd value
          philmodjunk

          A pop up menu formatted to show the second value with the "override data formatting with value list" option enabled is essentially putting a field from a related table occurrence on your layout or an unstored calculation as each time that you scroll it into view, the system has to do a query to find and display that value from the value list table's table occurrence.

          • 2. Re: More performance issues: scrolling and the drop-down showing 2nd value
            justinc

            That makes sense.  Although, I'm not exactly sure what the 'override data formatting with value list' option does in the first place.  I'll have to go read up on that.  Hmmm...helps somewhat, but still seems vague (from FM Help):

            Note:  For closed pop-up menus, to display the value from the value list and ignore data formatting, select Override data formatting with value list. This is useful when, for example, the two fields are different field types.

             

            I did some more testing after reading your note and it appears that even just putting the simple related table's "fieldID" on the layout causes similar hitching in the scrolling.  My original thought was that it had more to do with the value list associated with the picker and not just being related data.  I should have tested that first.  (End of day rush, I guess.)

             

            Although, it does seem that when the field formatted with a drop down is on the layout, even if the field is a local field but the value list is from a related field, just having it sit there incurs the 'related data' penalty.  That is, even though the related data isn't showing, it appears to be evaluating the value list and causing the delay.  For example, I'm showing the 'CategoryName' field from TableA on the layout; my value list is two parts - TableB::ID and TableB::Name.  There's a scripted process that copies the 'TableB::Name' field back into 'TableA::CategoryName' field when the user makes a selection.  Having a drop down showing 'TableA::CategoryName' on the layout as a pop-up menu incurs the same penalties (it seems) as it would if I showed the 'TableB::Name' field directly.

            • 3. Re: More performance issues: scrolling and the drop-down showing 2nd value
              justinc

              My biggest problem still seems to be images - whether from a local container field or a related Images table, the loading of images causes very noticeable usability hit.

               

              It would be fine if this loading process didn't interrupt the rest of the UI rendering (specifically scrolling in my case) but it does seem to have a higher priority than the general window controls and interrupts the scrolling ability.  So even though I want to scroll down to page 12, the loading of the images makes it pause slightly as it scrolls by them on each page in between.  There's a product suggestion for the developers, I suppose.

              • 4. Re: More performance issues: scrolling and the drop-down showing 2nd value
                gofmp15

                Create thumbnails the size you need for a layout. These load a lot faster since they are often 1/5th or 1/10th or less than the original image.

                 

                Thus

                Image

                Image thumbnail 320

                Image thumbnail 1024

                etc.

                 

                If you need to show the full image say on a 27" imac screen, then create a layout just for the Image and use that via a clickable.

                • 5. Re: More performance issues: scrolling and the drop-down showing 2nd value
                  justinc

                  That's a good idea - I had done this before on another layout I was trying to improve, but hadn't applied that yet to this one.  I'll give it a shot.

                  • 6. Re: More performance issues: scrolling and the drop-down showing 2nd value
                    justinc

                    It's perhaps a bit clunky and not as elegant, but the way I got around this performance hit for the drop-down + value list issue was to show the local field (as I mentioned), but instead of a drop-down field I created a pop-over with a portal in it.  Then the portal has a full-row button that fires the script to do the 'selecting' of an entry.

                     

                    It's perhaps a bit heavy handed, but it does improve the performance of this layout.

                    • 7. Re: More performance issues: scrolling and the drop-down showing 2nd value
                      philmodjunk

                      Not sure that I would call that "heavy handed". A popover with selection portal can do many things not even close to possible with a drop down list or pop up menu alone, such as showing data from more than two fields, sorting the records on a field not visible or in an order other than ascending to name several examples.

                      • 8. Re: More performance issues: scrolling and the drop-down showing 2nd value
                        justinc

                        True, it has a lot of possible flexibility.  But it does require a fair bit more setup in terms of layout objects, styling, scripts, etc.  I put a little radio-style button to indicate which one was currently chosen, too, so more calculations there.