4 Replies Latest reply on Oct 14, 2014 12:51 PM by NickLightbody

    Too many styles is how many?

    DavidZakary

      I'm converting an FM11-created system into FM13. Adding and applying styles to all the elements on the user layouts. I've got 20-30 styles in the system right now. I'm finding the performance of the system starting to degrade while in layout mode. It takes longer for the system to respond when I click on an item and the style Inspector also takes a while (2-3 seconds) to refresh.

       

      Anyone else seen this? Solutions? Wondering if there is a practical limit to the number of styles one should have.

       

      EDIT - all the styles are saved to the style sheet - no local styles and there are a lot of elements on the form-style layouts. I know limiting the number of elements on a layout helps improve performance, but it isn't really an option in this case

       

      Dave Zakary

        • 1. Re: Too many styles is how many?
          mikebeargie

          When you use a converted file, it is assigned the classic theme and EVERY object is given it's own custom style. So while your average native theme stylesheet is only ~30kb, the stylesheets I've seen for complicated converted layouts can come close to a mb in size (you can measure it by what WebDirect spits out).

           

          The *best* thing to do would be to change the layout to another native theme, then style your changes to that theme, and save as a new custom style. This will allow you to style by class, instead of having a separate style for each object. This should also clear a lot of "junk" styling from your layouts.

           

          It's a lot of work, but you'll be rewarded by having the ability to restyle by class across your entire file by saving changes to the themes.

          • 2. Re: Too many styles is how many?
            DavidZakary

            That's what I've been doing. Still seems a little slow. A quit, restart and back into it seems to have brought a bit of the speed back.

            • 3. Re: Too many styles is how many?
              NickLightbody

              Hi Dave - I would agree with Mike - a small investment of time in setting up your own custom theme will pay dividends in the future.

              A useful approach is to create a new layout on which you place an example of every type of layout object you use - style each to suit you then set that style as the default style for each object. Save your new custom theme containing these defaults.

              Now change each layout to use your new custom theme. When you change from classic theme to a custom theme every object is set to the default style for that object which is why it pays to set all your defaults correctly first.

              Then refine and save variations on your default styles as new styles ideally using a logic naming syntax which makes it easy to identify each variation in the future.

              If you ever insert a field with a field label remember that FM13 adds a local style for each field label which need reverting to default or changing one of your styles from your custom theme.

              Finally remember that a custom style can become corrupted so it pays to save your custom theme as a new version regularly so this if this were to occur you can revert to an earlier version without lossing too much.

              HTH, cheers, Nick

              • 4. Re: Too many styles is how many?
                NickLightbody

                BTW - many dozens of styles in your custom theme is fine.

                N.