5 Replies Latest reply on Apr 16, 2017 2:46 AM by keeztha

    How do you clear FileMaker/Web Viewer memory?


      Product and version

      FileMaker Pro Advanced

      OS and version

      OS Name:                   Microsoft Windows 10 Home 64-bit

      OS Version:                10.0.14393


      Computer typex64-based PC
      ProcessorIntel(R) Core(TM) i5-6200U CPU @ 2.30GHz, 2400 Mhz, 2 cores, 4 logic processors
      Installed physical memory (RAM)8,00 GB


      I have a layout that contains a tab control within another tab control. In one of the tabs I have four Web Viewers that displays scatter plots through google charts (see image below). The problem is that whenever I switch layout or mode the memory of the Web Viewers does not get released which eventually slows down FileMaker and renders it useless. The only way I can release the memory at this point is to close down FileMaker.



      Any suggestions on how to solve this?


      How to replicate


      Switching layout/mode with several web viewers will make the memory consumption skyrocket quite fast if you do not set the web viewer content to empty before switching.



      Workaround (if any)


      Close down FileMaker to release memory.


      I can see that the memory consumption drops when pressing a button that sets the URL to nothing by either a toggle field/variable in the custom web address, If( toggleWV; URL) , or by using a scriptstep with "Set Web Viewer" and setting "Go to URL" to empty. However, if I set these solutions into a script trigger when I leave the Layout/Mode it only releases parts of the memory but not as much as the button press where I stay in the layout/mode. I tried to set goToObject to the tab with the charts and to each of the charts and then pause the script for 3 seconds to make them update with the empty URL. This step releases most of the memory but it is a quite annoying process for a user/developer. It still seems to be some memory that is not released and I am guessing it will slow down FileMaker eventually, at least it will take longer time until it reaches that level of memory usage this way.

        • 1. Re: How do you clear FileMaker/Web Viewer memory?



          Thank you for your post!


          The increase in Memory Usage depends on the complexity of the web page that you’re viewing in Web Viewer. Another user found that closing the Window released the Memory Usage: How to solve webviewer memory leak?


          To attempt to reproduce the issue:

          1. Created "test.fmp12"

          2. Added a Web Viewer to the Layout

          3. Added 5 records each which set the WebViewers to different pages via a field

          -Started at ~228 MB Memory Usage before adding the URLs and loading pages

          -Jumped to 348.5 MB Memory Usage after loading 5 different URLs on the different records

          -Clearing the Web Viewers released the Memory back to ~228 MB RAM (you don't seem to have this experience)

          -Closing the window (but not the application) cleared the Memory Usage back to ~260 MB RAM (wasn't as effective)

          -Quitting the Application released all Memory


          This experience may be due to our usage of the Operating System's Web Browser. However, I am sending a report to Testing and Development for further feedback.



          FileMaker, Inc.

          1 of 1 people found this helpful
          • 2. Re: How do you clear FileMaker/Web Viewer memory?

            Thank you for your reply TSPigeon!


            May I ask what method you are using for clearing the web viewers?


            And are you able to obtain the same results while clearing the web viewers in a script trigger when a user leaves the layout to a layout in another table and when a developer switches between browse and layout mode to make sure the memory is cleared?


            I really enjoy the possibilities the web viewers creates, but the memory build up had me discouraged from implementing more. Hopefully there is an easy workaround for this, like making sure the web viewers are fully cleared before switching layout/mode.


            I am hopeful that I may keep my google charts.


            Thank you once again!

            • 3. Re: How do you clear FileMaker/Web Viewer memory?



              Do you have any updates on this matter?

              • 4. Re: How do you clear FileMaker/Web Viewer memory?



                Apologies for the wait. I was originally just clearing out the "Field" which I had set to a URL, then gave the WebViewer a second to refresh.


                I tried this with scripting (SetField [ Field ; "" ] ). It seems to work if you give it enough time to refresh the WebViewer so that it is empty (Pause Script Step for instance).


                I have no further feedback from Testing and Development at this time.



                FileMaker, Inc.

                • 5. Re: How do you clear FileMaker/Web Viewer memory?

                  Hi all,


                  i had the same issue.


                  my FileMaker program is as follows:

                  1. when a operator clicks a button, a script starts.
                  2. the script creates new window with a webviewer and 3 buttons,
                    and sets url to the webviewer.
                    (note: the webviewer default setting is [Custom Web Address; URL=""].)
                  3. 1st script finishes.
                  4. the operator watches the web page of the new window,
                  5. and selects any button.
                  6. when the button of the new window is clicked, 2nd script starts.
                  7. the 2nd script closes the new window.
                  8. 2nd script finishes.



                  At first, the 2nd script only closed the new window.

                  Close Window [Current window]

                  in this case, after the operator opened 20 urls, the memory usage increased as follows:

                  232,072 KB -> 1,211,172 KB

                  (Dos command >tasklist /fi "imagename eq FileMaker*" )

                  it was a serious waste of memory resources.



                  Next, i added webviewer clear and reset steps to the 2nd script.

                    Set Web Viewer [Object Name: "wv"; URL: ""]
                    Set Web Viewer [Object Name: "wv"; Action: Reset]
                    Close Window [Current window]

                  however, there was no effect at all:

                  244,420 KB -> 1,212,388 KB

                  (note: the operator opened same 20 urls in every cases.)



                  Finaly, i tried to add pause step after webviewer clear step.

                    Set Web Viewer [Object Name: "wv"; URL: ""]
                    Set Web Viewer [Object Name: "wv"; Action: Reset]
                    Pause/Resume Script [Duration (seconds): 1]
                    Close Window [Current window]

                  this trial was very effective!!!

                  231,804 KB -> 361,760 KB



                  i thought that it needs some milli-seconds to clear the webviewer cache, and if the webviewer is closed in the middle of clearing the cache, the remaining cache is not released until FileMaker closing.



                  • version: FileMaker Pro Advanced
                  • os: windows 7 professional 64bit
                  • file location: local
                  • 20 urls for trial:
                    • https ://www.google.co.jp/search?q=ape&num=500&site=imghp&source=lnms&tbm=isch&sa=X&biw=1200&bih=920
                    • https ://www.google.co.jp/search?q=bear&...
                    • https ://www.google.co.jp/search?q=cat&...
                    • https ://www.google.co.jp/search?q=dog&...
                    • https ://www.google.co.jp/search?q=elk&...
                    • https ://www.google.co.jp/search?q=fox&...
                    • https ://www.google.co.jp/search?q=goat&...
                    • https ://www.google.co.jp/search?q=hippo&...
                    • https ://www.google.co.jp/search?q=iguana&...
                    • https ://www.google.co.jp/search?q=jagar&...
                    • https ://www.google.co.jp/search?q=kangaroo&...
                    • https ://www.google.co.jp/search?q=leopard&...
                    • https ://www.google.co.jp/search?q=mole&...
                    • https ://www.google.co.jp/search?q=nutria&...
                    • https ://www.google.co.jp/search?q=owl&...
                    • https ://www.google.co.jp/search?q=panther&...
                    • https ://www.google.co.jp/search?q=quil&...
                    • https ://www.google.co.jp/search?q=racoon&...
                    • https ://www.google.co.jp/search?q=salamander&...
                    • https ://www.google.co.jp/search?q=tiger&...



                  good luck to others


                  1 of 1 people found this helpful