10 Replies Latest reply on Aug 23, 2012 9:37 PM by rouelf_1

    Super Secret Technque Uncovered!


      Super Secret Technque Uncovered!


      Here's a 'secret' that might help in many cases...

      Use a Blank page. You can create a layout named Blank tablename and delete all of the fields. It helps, I assume, to use the basic layout in 12.

      Filemaker has been hiding many layout choice by using a selection dialog designed for a cell phone instead of a modern computer so you can also use the down arrow (what a waste of time, huh) to locate the Blank layout option.

      I've found using an empty layout has saved a lot of time in various script steps, especially ones with related fields but the file is not available.

      Other times instead of using a Form field with tons of portals to loop through records, the blank layout zips right through while I can still use some functions such as GTTR as the table is related to this table, not the layout.

      Ocassional some oddball feature will provoke a bug with this idea, but very seldom.

      If you have been using Form layouts with a dozen portals on them or table layouts with 95 fields on them to loop through records, I think you will find this speeds up that script a bit...  

      And when you step through layouts to do stuff, using the blank layout for each table can save the redraw time, etc.

      Warning: I am cross posting this in the Pro forum so don't chastise me for this...  :)

        • 1. Re: Super Secret Technque Uncovered!

          Hey, read your post several times, but I find incoherent. My appologies.

          • 2. Re: Super Secret Technque Uncovered!

             Same here...not sure what you mean.

            • 3. Re: Super Secret Technque Uncovered!

              A blank layout can be used to set table occurrence context when a script executes such as a script that puts data in variables, switches layouts, creates a new record and copies data from the variables into fields of the new record--one way to add new records to a portal without having to scroll the portal.

              Blank and no script triggers can make for simpler and (according to Jack), slightly faster execution than switching to a layout based on the same table but filled with layout objects and script triggers that migh be tripped by your script.

              • 4. Re: Super Secret Technque Uncovered!

                Thanks Phil, I get it now. I have a an application that imports a text file with all the data for the database, and then parses the text extracting all the data to populate all the fields in various tables, resulting in hundreds of records in the various tables. This currently takes about 10 min to excute (the more data the longer it takes). Parsing text, and creating new records for the data is very slow, maybe this technique can shave some time off this process, that would be awsome.

                • 5. Re: Super Secret Technque Uncovered!

                  The Blank layout is not 100% since occassionally Filemaker acts like the Filemaker of old and requires a field to be on the layout.

                  But, (according to Jack!) you will find things do function faster when there is no delay to fill a portal or run triggers or other layout stuff.

                  The Top Secret Rule: you do not need fields on a record to use the record. Filemaker used to be and still may be a macro program that required the fields to function (at least it seemed to be).

                  • 6. Re: Super Secret Technque Uncovered!

                    Thanks Jack, I used this technique. It helped slightly, it took 40 sec from 643 sec process. that is 6% improvement. Was hoping for more, but it is what it is. Thanks.

                    • 7. Re: Super Secret Technque Uncovered!


                      Have you done your comparisons between blank and non-blank layouts with the "freeze window" step? That's why I said "according to JacK". I'm not disagreeing with you, just haven't run these tests for myself and Freeze Window is supposed to make for faster script execution for the same reason that using a blank layout should be faster...

                      • 8. Re: Super Secret Technque Uncovered!
                        Hey Phil,  Rouel here, not Jack, I know that "freeze window" does work to speed up script execution. I always use it,  and when I ran tests with my application using "freeze window", with blank and non-blank layouts that is when I consistently obtain about 40 sec improvement from a 640 sec process. But one should be careful to test under similar conditions, to compare apples with apples. Not always easy to do. For example, today rebooted the computer, MacBook pro, opened FM Pro 11 Adv, ran my program, with blank layouts,  it took 848 sec, that was 180 sec longer than I had ever seen before. Then I ran it again, the resulting time execution was the same as I had obtained with non- blank layouts a day earlier, 638 sec. Then I ran it again, the third consecutive time, the resulting execution time was 40 sec faste, 596 sec. Then I ran it again, now with non blank layouts, it took 43 sec longer than with blank layouts, total execution time 643 sec. I would not suggest this as proving that blank layouts are really an improvement, as there could be other stuff going on with CPU usage possibly affecting script executions ? Am taking a 6% change in script execution time as noise, not worth more time than what we have put in on this topic. So am off this topic, and seek other ways, to improve looping, creating new records, setting fields, layout switching, and more new records and more setting fields.
                        • 9. Re: Super Secret Technque Uncovered!


                          Filemaker loads a lot of data into RAM, both chips and disk, and gets faster as it goes until so much virtual memory is used that clearing it for new stuff takes a long time

                          Also, a simple idea of using a script to set data in a layout as the user saves the layout rather than using calculations to perform the same task, can save mucho update time in a daily update script since all those calculations are eliminated each time a record loads regardless of the layout type.

                          Also, creating a TO for a specific purpose can help. Consider invoices. If you maintain an TO for the invoice and use it to print a report and the data is set as above, this will be almost instantaneous.

                          But, if you have 22 tables linked to the invoice file and it looks like a nest of octopi, then tons of calculations in each file will slow down the reporting as Filemaker has to churn through all of those calculations.

                          • 10. Re: Super Secret Technque Uncovered!


                            Thanks, changing several "Set Field" to "Replace Field Content" after creating "New Record" script in loops produced 30% speed improvement. Though sometimes causes undesirable results, so may not be possible to do every where a create new record step is followed by several Set Field steps. The quest for speed is quite art. Thanks again.