13 Replies Latest reply on Nov 2, 2016 1:44 AM by rrrichie

    FileMaker greedy and badly-behaved in the background

    JohnDCCIU

      Product and version FileMaker Pro 14.0.4 (but extends all the way back to v11, and probably before that)


      OS and version OS X 10.11 (but same issue going back many OS X versions)

       

      Any and all

       

      Description  FileMaker has always misbehaved in the background in OS X when it's running a long script, greedily stealing enough CPU cycles that attempting to enter text in other apps is not only halting, but typed characters actually don't make it into the keyboard buffer, leading to lost input in whatever the foreground app is.  Even things like trying to do a Command-Tab to switch between apps only works intermittently because the keypress is lost. 

       

      The FMI devs need to correct the FileMaker app to behave properly in the background, ceding time properly to the OS and other apps so that this behavior is eliminated.  I've never seen another app in OS X do this and I'm surprised that the FileMaker app is even able to suck this much out of a system.  My initial conspiracy-theory guess is that the devs used some undocumented APIs (being a subsidiary of Apple helps ;-) that shouldn't be used in order to enhance performance, but at the expense of being a decent app-citizen.

       

      It doesn't matter how powerful the OS X hardware is:  the background behavior is just as egregious on a kick-butt brand-new round Mac Pro with 64GB of memory and a PCI SSD, as it is on a low-end Mac Mini, so it's not a resource issue:  it's an app-behavior issue.


      How to replicate  Run the attached FileMaker database on a OS X machine; it will run in a long loop, adding many records, sorting them, deleting the records, then going around again.  The effect seems to be more pronounced when the database  is hosted, but it does still happen locally. 


      While the loop is running, switch to any other app, leaving FileMaker running in the background, then continue on with your normal work for awhile, especially doing emails or something that involves text entry, and the symptoms should reveal themselves intermittently.


      It's most noticable when you pause for a bit (to move the mouse, to read what you've written, take a phone call, etc).  The symptoms are:

      • keypresses are simply ignored; the keypresses are lost
      • keypresses lag behind, with text appearing later
      • sometimes text that you type appears out of order, as the keyboard buffer gets messed up
      • the system overall is unresponsive at times

       

      Workaround None.

        • 1. Re: FileMaker greedy and badly-behaved in the background
          AnthonyLambert

          This bugs me, too.

           

          Your description of the symptoms is excellent and exactly right, though I must disagree with you about the history. I've only noticed this in FileMaker 13 onwards (and I've used every version back to 4).

          • 2. Re: FileMaker greedy and badly-behaved in the background
            TSGal

            JohnDCCIU:

             

            Thank you for your post.

             

            So far, I have been unable to replicate the issue.  I ran the script yesterday, and I've been running the script for a couple of hours now.  Is there a general time period when you see this occurring?

             

            I'm running under Mac OS X 10.11.3, with Safari, Chrome, Apple Mail, Activity Monitor, VirtualBox, Remote Desktop, Messages, and FileMaker Pro Advanced 14.0.4 running.

             

            What applications are you running?

             

            Does FileMaker Pro have any plug-ins installed?

             

            Let me know what else I can do to replicate the issue.

             

            TSGal

            FileMaker, Inc.

            • 3. Re: FileMaker greedy and badly-behaved in the background
              CamelCase_data

              I've had this issue numerous times over the years.

               

              What I noticed when quickly trying John's test file was that deactivating plugins seemed to at the very least help a lot.

               

              It was specifically re-activating 360Works FTPeek that brought the issue back quite noticeably. I've seen similar and possibly related issues with other 360Works plugins too, so I'm not sure if it's FTP-specific or a more general problem with their java virtual machine, but this might be something to look closer at.

               

              JohnDDCIU - do you have any plugins installed?

              • 4. Re: FileMaker greedy and badly-behaved in the background
                JohnDCCIU

                Sorry for the long delay on this; just haven't had the time to test this properly.

                 

                I don't run 360Works FTPeek, but I do run 360Works Email and that does not trigger the issue for me (at least not just the presence of the plugin).

                 

                The plugin that really triggered the issue was 2EmpowerFM's Developer Assistant.  I've reached out to the developer to see if there's anything he may be able to look into, to see if there's some way of giving back CPU cycles or something.

                 

                However, it's possible that the issue lies in the interface with FileMaker somewhere, i.e. that FileMaker is the misbehaving process when it has plugins present, and that the plugin developers won't be able to do anything about it.

                 

                I'll post further as I find out more.

                • 5. Re: FileMaker greedy and badly-behaved in the background
                  CamelCase_data

                  I also use 2EmpowerFM's Developer Assistant, and given what it does, it is certainly not going to boost performance. However, I can't really see why it should be "active" at all while you're running a script. So if this plugin is indeed a culprit, it hopefully shouldn't be too difficult to fix without affecting the general functionality of the plugin.

                  How did you determine that 2EmpowerFM's Developer Assistant was the issue? Simply by removing it and not having the slowness anymore? Or by other, perhaps more direct method?

                  • 6. Re: FileMaker greedy and badly-behaved in the background
                    cdragon

                    2empowerFM Developer Assistant author here,

                     

                    I've been running FileMakerBehavingBadly.fmp12 for about 3 hours and noticed no symptoms so far.  I'll report back if I see any problems.

                     

                    DA doesn't do much while FileMaker is in the background.  It does always have its hooks watching for things like windows coming to he foreground so it can update the Toolbox display but that won't cause gradual slowdown unless there is an undiscovered bug of some sort.

                     

                    JohnDCCIU says they're running 64GB of memory and a PCI SSD on a "low-end Mac Mini".  My test machine is a "Late 2012" Mac mini, 2.5Ghz Intel Core i5, 16 GB memory, SSD, so probably very similar but much less memory.

                     

                    * Have those affected tried closing all other apps possible?

                    * What about background apps?  Someone here reports possibly fixing keyboard lag by closing macfancontrol and vlcstreamer.

                    * Are you using a wireless keyboard or mouse?  Or remote controlling the machine, and if so, using what software?

                     

                    * While the slowdown occurs, does Activity Monitor show anything in particular spiking CPU in the CPU tab?

                    * Is anything using a huge amount of memory in the Memory tab (click Memory column to sort by memory use)?

                    * Is anything reading or writing a lot in the Disk tab?

                     

                    * Is Spotlight indexing or Time Machine doing a backup any other periodic process running during slowdown?

                    * Is the FileMaker file running local or on network/FileMaker Server (gotta assume local but have to ask)?

                     

                    For something to cause the mouse to stutter or keystrokes to be lost should take an extreme amount of bad behavior or a bug in the OS or drivers.  Activity monitor should show SOMETHING, either 100% CPU, or huge amounts of memory used, or lots of disk I/O.  If you can see what process is doing any of those things (maybe it's not actually FileMaker?) that might help.

                     

                    EDIT:

                    * Also watch the Console app to see if a particular message consistently appears in 'All Messages' or 'system.log' around the time of each slowdown.

                    3 of 3 people found this helpful
                    • 7. Re: FileMaker greedy and badly-behaved in the background
                      cdragon

                      I ran the FM behaving badly for about 36 hours (overnight) and never saw the system slow down, so I definitely can't reproduce the problem.  All 2empowerFM plug-ins were installed, but no other plug-ins.  Also remember that plug-ins can sometimes conflict, so things might break with two particular plug-ins installed but be fine with either one installed on its own.

                       

                      Someone mentioned that uninstalling a plug-in made the slowdown problem get better, but not go away.  That suggests the problem has nothing to do with the plug-in other than the plug-in uses a little more CPU so makes the problem appear more often.  Plug-ins inherently must use some extra bit of CPU as FM calls them with its idle loop or plug-ins have their hooks called on various internal events.

                       

                      Here's some other theories that seem less likely since multiple people have reported the same problem:

                       

                      System slowdown, especially jittery kb/mouse, can also be caused by malfunctioning hardware.  For example, a USB device can spit out random signals that overload the USB bus and cause valid USB traffic to be lost.  So try unplugging anything non-essential and try using a different kb/mouse.  Better yet, see if the problem occurs on a completely different system since it might be hardware within the computer that's malfunctioning.

                       

                      These kinds of hardware problems sometimes only manifest when things get hot enough, and if FileMaker (or any program) is straining the CPU with high usage, suddenly the problem manifests.  So you might check if the mouse jitters when some program other than FM is using high CPU.

                      • 8. Re: FileMaker greedy and badly-behaved in the background
                        justinc

                        I have had this same issue for a number of years/versions of FM.  I don't recall when I first noticed it happening, though.  I primarily noticed it after I started using Inspector Pro, which uses the 2Empower DA plugin, the 2Empower family plugin, and one other plugin.

                         

                        But I have also noticed this using regular FMPA; my current v15.02 does have the 2Empower plugins present, but they are disabled (un-selected in the Preferences).  There is the BaseElements and a custom plugin currently present and in use in my FMPA version.  But I do recall this problem happening before I started consistently working on the file that required the BE and custom plugins.

                         

                        There are a few other threads out there about this; they primarily have the language of 'filemaker steals keystrokes' in them.  Here's one:  Filemaker 14 "stealing" keystrokes during long scripts

                        • 9. Re: FileMaker greedy and badly-behaved in the background
                          PeterDoern

                          I've had the 2empowerFM Family and SQLRunner plugins installed since v11 and I've been happy to have been able to use the SQL functionality in a v11 file to create records in unrelated tables.

                           

                          I've been following the Filemaker 14 "stealing" keystrokes during long scripts thread but it wasn't until I was redirected here that I learned that plugins might be the culprit.

                           

                          I'm sorry to say that it's the 2empowerFM Family v2.53 plugin that is the culprit, at least in my case. My main pain point until now has been entering passwords which are typically hidden from view AND contain special characters, so I used this as my test case.

                           

                          After repeated tests with the helpful sample file provided and with 2empowerFM Family turned on and off, the conclusion is inescapable. I will note that the problem only exists (for me) with FM14 and 15. Hopefully that will help you narrow down the issue.

                           

                          All the best,

                           

                          Peter

                          1 of 1 people found this helpful
                          • 10. Re: FileMaker greedy and badly-behaved in the background
                            TSGal

                            PeterDoern:

                             

                            Just to make sure, try testing with only the 2empowerFM plug-in enabled, as the issue may be caused by a combination with the SQLRunner plug-in or other plug-ins.

                             

                            TSGal

                            FileMaker, Inc.

                            • 11. Re: FileMaker greedy and badly-behaved in the background
                              PeterDoern

                              Hi TSGal,

                               

                              Yes, this is what I did: first tested with a combination of plugins, then enabled them one at time... it was just the 2empowerFM plugin on its own that was (apparently) causing the problem.

                               

                              Peter

                              • 12. Re: FileMaker greedy and badly-behaved in the background
                                TSGal

                                PeterDoern:

                                 

                                Thank you for the clarification.

                                 

                                TSGal

                                FileMaker, Inc.

                                • 13. Re: FileMaker greedy and badly-behaved in the background
                                  rrrichie

                                  That thread (Filemaker 14 "stealing" keystrokes during long scripts ) does have a solution, the author of 2empowerFM made a change and that solves the issue ( at least in my case :-), so I am happy. )

                                   

                                  If you develop your plugin's that thread is good read.

                                  1 of 1 people found this helpful