6 Replies Latest reply on Aug 14, 2015 9:42 AM by TSGal

    Filemaker 14 slow when Script Workspace open

    WilliamThurmes

      Summary

      Filemaker 14 slow when Script Workspace open

      Product

      FileMaker Pro

      Version

      Advanced 14

      Operating system version

      Windows 7

      Description of the issue

      Noticeable slowdown when one script workspace window is open; slower still when two are open, slower still when three are open. (These all might be fixed with the planned update in a couple weeks.)

      Steps to reproduce the problem

      In one layout, OnLayoutKeystroke triggers OnTimer script (which ensures changes will eventually be committed).
      Having one script workspace open & minimized creates a lag between typing and character appearance. Opening a second script workspace (also minimized) makes the lag much more noticeable. Opening a third script workspace slows it down to less than a character a second appearing.

      Expected result

      character appearance on screen, in field, immediately after the character is typed

      Actual result

      Characters' appearance on screen lags well behind actual typing.

      Exact text of any error message(s) that appear

      none

      Configuration information

      FireFox was the only other open application. Tested with the same databases, a different computer running FMP (not FMPA), did not have the problem (FireFox was not installed on this). A third computer, also running FMP, had the same problem, whether FireFox was open or not.

      Workaround

      Closing script workspaces speeds things back up again, but is inconvenient in a multi-file solution.

        • 1. Re: Filemaker 14 slow when Script Workspace open
          TSGal

          William Thurmes:

          Thank you for your post.

          Is the Install OnTimer Script active?  What is the time duration of the Install OnTimer Script script step?  Do you see the same lag if the Install OnTimer Script is disabled?

          TSGal
          FileMaker, Inc.

          • 2. Re: Filemaker 14 slow when Script Workspace open
            WilliamThurmes

            Since I diagnosed this problem at work, where I have FMPA14, but am on vacation until Monday Aug 3, I can only give you a partial answer at this time. Unfortunately I don't have FMPA14 on my home computer yet.

            By 'the Install OnTimer script', I take it you mean the script that gets triggered and invokes the Install OnTimer command, rather than the script run by that command once the interval is complete.

            The Install OnTimer script is active, and has a variable duration of 5 to 10 minutes, depending on which layout of which database it's in. That particular script is essentially designed to make sure that when someone types into fields on a layout, what they type in eventually gets committed. I started using it after one of my users told me many times "I'm sure I typed that in" when the data that was there clearly hadn't been altered; I eventually determined that he habitually left records uncommitted. Since most of what got typed in was development notes, it was critical that the data be committed. I've used this tactic in many of the layouts in the 50-some active database files FMS is serving at my work (there are a couple multifile DBs, remnants from the FileMaker 5 days, among them).

            The OnTimer script, triggered by every keystroke in a layout in which it's active, invokes a script 5 to 10 minute later. That script commits the record and does a blank Install OnTimer (thus cancelling further OnTimer scripts). The net result is that, if no typing happens for 5 to 10 minutes, the record in that layout is committed.

            I can't say for sure (until next Monday) whether the lag will happen if the OnTimer script is disabled, but I'd be willing to bet that the lag will not happen unless the script is enabled. By the way, I don't know whether this is relevant, but these files are served by FMS13. I'll play with them on Monday and see whether enabling/disabling the OnTimer script or running backups of the files on my computer (ie not served) makes a difference.

            Thanks for your help, --Bill

            • 3. Re: Filemaker 14 slow when Script Workspace open
              WilliamThurmes

              Here's the rest of the answer:

              As I thought, when the OnTimer script is inactivated, letters showing up on the screen no longer lag behind the ones being typed.

              The number of scripts open in the Script Editor window doesn't affect the speed (but, as I said, the number of Screen Editor windows open definitely does.) I have a hard time telling whether opening up another version of the same window (move tab to new window) makes a difference; when I opened a tab in a new window (going to 4 Script Editor windows open at one time), it slowed down some (with the time required to exhibit 6 characters going from 6 to 10 seconds), but when I then closed that extra window it slowed down even more, taking 25 seconds to exhibit 6 characters.

              It also seems a lot slower when I open up a file that's written on my hard disc, vs. a served file, with it taking about twice as long to exhibit each character.

              By the way, I don't mean to imply that this is the only time FMPA14 slows down, just that this was the only circumstance that was reasonably reproducible. I have to restart my Windows computer about once a day when I use FMPA14, just because things bog down so much, even when all other programs on my computer have been shut down. As an example, today I waited 33 seconds between, in the Button Setup dialog box, clicking on the Action popup menu and actually seeing the popup list. I don't know enough about Windows memory management to know why that was taking place.

              Anyway, thanks for your help,

              --Bill

              • 4. Re: Filemaker 14 slow when Script Workspace open
                TSGal

                William Thurmes:

                Thank you for the additional information.

                Do you ever turn off the Install OnTimer Script?  Or, does it run continuously?  What is the duration?  Since this is an OnLayoutKeystroke script trigger, it will relaunch the Install OnTimer Script.  Or, do you have a variable in place that ignores the current running of the Install OnTimer Script script?

                Please post the script as this appears to be the cause of the delay.

                TSGal
                FileMaker, Inc.

                • 5. Re: Filemaker 14 slow when Script Workspace open
                  WilliamThurmes

                  HI TSGal,

                   

                  Here's the trigger script, with comments deleted for brevity (I'll also post a picture just in case I misspelled something):

                  Set Variable [$Time ; Value: If ( Get ( ScriptParameter ) ; Get ( ScriptParameter ) ; 5 ) ]

                  Install OnTimer Script ["CommitRecords from OnTimer" ; Interval: $Time*60]

                  Exit Script [Result:1]

                   

                  Here's the target script ("CommitRecords from OnTImer"):

                  Commit Records/Requests[no dialog]

                  Install OnTimer Script []

                   

                  The trigger script is triggered by OnLayoutKeystroke. Each keystroke 'resets' the OnTimer script to run the target script 5 minutes out, if no additional keystrokes occur. So, if the user quits typing in FM, perhaps switching to another program or walking away from the computer, the record is committed 5 minutes later (unless a non-default amount of time is passed via the ScriptParameter). This pair of scripts did not noticeably slow things down under FMPA 13.

                  --Bill

                  • 6. Re: Filemaker 14 slow when Script Workspace open
                    TSGal

                    William Thurmes:

                    Thank you for the script information.

                    Although FileMaker Pro 13 (and earlier) are 32-bit applications, are you running FileMaker Pro 14.0.1 32-bit or 64-bit?  If 64-bit, have you tried this under 32-bit?  How about the other machine where it wasn't occurring?

                    Do you have a sample file that I can work with?  If so, check your Inbox at the top of this page for instructions where to send the file.

                    TSGal
                    FileMaker, Inc.