WAN performance can be difficult to measure and improve. Your solution works great in the office, but when used outside your network, it is slow. Why? How can you make it better? This is the topic of many community postings and DevCon sessions over the years. Since network latency is often a significant factor in slow performance, the collective wisdom is to “send less data over the network”
Sounds simple, right? “If I could get rid of my client’s data, this system would be blazing fast!” Now is the time to really think about why data is moving over the network, and then determine if it is really necessary at the time it is being done. Time to get creative.
The general idea is to remove as much related data as possible from being displayed or used on your layout. We know you will have to download the data for the table occurrence on which the layout is based, but you may have unnecessary portals, or unstored calculation fields which use related data, conditional formatting which refers to related data, etc.
Remember that even if you refer to only one field in a related table, the ENTIRE record is downloaded to the client.
Side note: when navigating to a layout and performing a find in a script, always enter find mode prior to the Go To Layout script step. This will prevent FileMaker from downloading the first 25 records of the table on which the layout is based.
We in FileMaker IS&T (the “eat our own dog food” group) have developed a little Mac-only client-based utility which helps measure and store the amount of data going to and from the FileMaker Server. We use Network Monitor.fmp12 to measure the effects of changing schema and layouts on network performance and it is proving to be invaluable in learning where we use related data and perhaps do not need to.
The usage of the tool is simple:
- Open Network Monitor.fmp12 and click Quit and Clear Cache. This will delete FileMaker’s local cache file so that data does not skew the results of the next operations.
- Open your solution and get to the point at which you wish to begin measuring the data flow with the FileMaker Server. I often enter find mode and go a layout.
- Click Start in Network Monitor.fmp12.
- Perform some actions in your solution (e.g. perform a find, navigate to another layout, etc.).
- Click Stop in Network Monitor.fmp12.
- View the results.
- You may optionally wish to store the results with a description of what you did. Use the log to compare results over time, after you’ve made tweaks in your solution.
The tool only measures data size, not speed. Remember there are other factors which will also affect speed, such as client-side sorting, graphics rendering, script triggers, etc.
The tool is totally open for you to learn from, update and enhance for your own use.
Download NetworkMonitor.fmp12 at the bottom of this page.
UNDER THE HOOD
When NetworkMonitor.fmp12 is opened, it exports 2 shell scripts and 1 compressed AppleScript into a temporary directory to be used by the solution.
The shell scripts use the nettop command, which outputs a list of processes that have active network connections. The data is displayed as a number of bytes in and bytes out over the network from the time that each process was launched.
When the Start button is pressed, the values of the in (using the ‘nettop_in.sh’ shell script) and out (using the ‘nettop_out.sh’ shell script) data values are stored in global fields.
When the Stop button is pressed, the same data values are grabbed and stored, and then the difference is calculated to get the total change in data from when the Start button was pressed.
The AppleScript is used to clear the cache. The AppleScript application is unzipped into a temporary directory and must be run as an Application to allow it to close FileMaker completely and then clear the cache files. The AppleScript named ‘clear_cache.app’ first gets the file path of the file which is stored in the active_filename_glob global field when the script is run. This is so the file can be reopened after the cache is cleared and works whether the solution is hosted or local to the client. The script then closes FileMaker completely and then deletes the entire cache folder for FileMaker. Then using the file path reopens the solution.
The file is completely open so you can customize it for your own use.
We look forward to your comments below.
FileMaker IS&T Intern
By downloading and using Network Monitor you accept the following license terms:
Network Monitor License
Copyright © 2018 FileMaker, Inc. All rights reserved.
License Grant. FileMaker, Inc. grants you a non-exclusive limited license to use Network Monitor (“Software”) with a licensed copy of FileMaker software solely to view/store the amount of data transferring over TCP port 5003.
Intellectual Property. FileMaker owns all rights to the Software, including intellectual property rights therein.
No warranty. THIS SOFTWARE IS PROVIDED BY FILEMAKER, INC. ''AS IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FILEMAKER, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Indemnity. You will indemnify and hold FMI harmless from any and all claims, damages, losses, liabilities, costs and expenses (including reasonable fees of attorneys and other professionals) arising out of or in connection with your use of the Software.
Export Law Assurances. You may not use or otherwise export or re-export the Software except as authorized by United States law and the laws of the jurisdiction in which the Software was obtained. In particular, but without limitation, the Software may not be exported or re-exported (a) into any U.S. embargoed countries, or (b) to anyone on the U.S. Treasury Department's list of Specially Designated Nationals or the U.S. Department of Commerce's Denied Person's List or Entity List. By using the Software you represent and warrant that you are not located in, under control of, or a national or resident of any such country or on any such list. You also agree that you will not use the Software for any purposes prohibited by United States law, including, without limitation, the development, design, manufacture or production of nuclear, chemical or biological weapons.