3 Replies Latest reply on Dec 6, 2013 6:29 PM by mark_scott

    Managing CSS and filesize - improvements in FM13?

    TomDupre

      I have a fairly complex solution consisting of several files, the main ones being data and interface files (ie it uses the separation model). The solution is currently in FM11. One reason for not converting to FM12 was the initial performance issues. The other main reason was the limitation of themes - eg not being able to create custom themes (at least if following FM's advice), to apply styles globally or generally to have direct access to the CSS. One issue resulting from the new themes feature was that the interface file more than doubled in size - from about 30MB to over 60MB. FM13 offers some improvements (I suppose it was never going to be realistic to expect access to plain, optimisable CSS), but the filesize issue is the same. Has anyone any tips or suggestions for addressing this issue?

       

      There are a few graphics which I could replace using gradients (but only a small number, and they are shared between layouts). I imagine the main problem is the amount of CSS (or whatever FM does to the CSS) produced to recreate the 'customised' version of the default Classic theme. I tried converting to 12 and removing all styles from all layouts (something which I think is much easier in 12). This made a considerable difference - it removed almost half of the extra filesize, but the file was still a lot larger than the 11 version (and not very pretty without any styles). It would probably be close to double the size again by the time I had styled everything again from scratch (and I would be quite a bit older too).

       

      Assuming that much larger filesize is not an intrinsic feauture of FileMaker's themes, I imagine the only way to produce a .fmp12 version of this file without the superfluous megabytes would be to start from scratch - at least as far as the layouts are concerned. This would be a huge task which wouldn't be feasible, at least only over time. Can it really be that .fmp12 files have to store so much superfluous/redundant 'theme data' and that there is no way of optimising them in this respect? I may well be missing something and would be very grateful for more information or suggestions. Have others just converted or has anybody felt the need to 'rewrite' (or at least recreate layouts etc.)?

       

      Thanks in advance,

      Tom Dupre

        • 1. Re: Managing CSS and filesize - improvements in FM13?
          mark_scott

          Hi Tom,

           

          You may already have discovered this, but new to FM 13 is that you can now delete unused themes from a file via the Manage Themes dialog.  In my testing, removing a theme from a file completely recovered the space taken up when the theme was first added to a layout (i.e., file size shrunk back to where it was before the theme was first added).  Also, FM seems to be much better now about changing themes within a layout without accumulating crud and introducing styling artifacts. 

           

          This may help to some extent.

           

          Mark

          • 2. Re: Managing CSS and filesize - improvements in FM13?
            TomDupre

            Hi Mark,

             

            This was very helpful and encouraging. I had completely missed the new option to remove aunused themes. I thought I had read somewhere that unused styles are kept in the file; if this is true, it's presumably only true unless you remove the relevant theme.

             

            Unfortunately I was still unable to remove the Classic them. I applied a different style to all 430 layouts (I switched to a Windows machine for this so I could do all of this without the mouse). The theme manager indicated there were no layouts using the Classic theme but the 'delete' option was greyed out. Strangely, the new theme which was now used by all 430 layouts had the 'delete' option enabled - but choosing the option displayed a message with the name of the first layout using the theme, explaining the theme couldn't be deleted therefore. This seems rather buggy. If the delete button is greyed out if a theme is in use, then there would be no need for such a dialog box to exist. I don't think there is any corruption in the files - they have never crashed and are regularly checked for errors.

             

            In any event the filesize is consideraly reduced - down to 40MB compared to the .fp7 30MB. If the unused theme could be deleted, this might remove the 10MB. I might try converting the file to FM12 and then to FM13 to see if that helps. Perhaps there's a good reason why the 'unused' theme can't be deleted but I don't know what it could be.

             

            Many thanks,

            Tom

            • 3. Re: Managing CSS and filesize - improvements in FM13?
              mark_scott

              Hi Tom,

               

              I, too, have noticed that Classic (uniquely) can't be deleted.  Not sure whether this is a bug or by design, but I suspect the latter.  Classic, starting with FM 12, has always been a special case, as the final fallback whenever a "real" theme is not applied to a layout (in converted .fp7 files, for example).  It's often been characterized as being somewhat "hardwired."  It may be there from the start (even if not initially listed in the Manage Themes dialog until explicitly applied to a layout) to provide defaults in the case of a theme that's somehow missing one or more property declarations for some object, and thus not removable.  Just a thought.

               

              Mark

               

              Message was edited by: Mark Scott - corrected ".fp5" to ".fp7"