Perform Script On Server (PSOS): Overview

The “Perform Script on Server” script step was introduced in FileMaker Server 13 to let clients of a hosted file run scripts on the server. So with some careful planning, you can have the server do a lot of the heavy lifting the client machine would normally have to do (finding, sorting, processing, other data manipulation, etc.). This means you can sometimes avoid moving large amounts of data over the network, which is what normally happens when the client machine runs a Perform Find or an SQL query on a hosted file.

Using PSOS can result in dramatic performance improvements in these types of operations when opening your file from outside your local network. Our tests with the Pro Calendar showed refresh times 10-40 times faster when using PSOS from outside the network (your mileage may vary).

You’ll likely not see any improvement when you’re ON the local network.

PSOS in SeedCode Calendar Pro

Perform Script on Server in SeedCode CalendarThe new upgrade for SeedCode Calendar adds a switch for using PSOS on the calendar’s settings tab. Developers can turn this on for just their session while they’re testing or they can make it the default by editing the comment for PSOS in the calendar’s “Load Settings” script.

Why wouldn’t everyone want PSOS on?

The speed improvements in PSOS are most dramatic when you’re far away from your FileMaker Server. But it does come with a trade off: scripts run under PSOS don’t cache their results the way scripts running locally would. So if your server is close enough, you may not want PSOS running because you’d rather have the caching.

Here is an exaggerated example:

  • Without PSOS, opening your calendar from another state takes 9 minutes to move from month to month. But once you’ve been to a given month, going back to that month takes only a couple seconds.
  • With PSOS on, it only takes 5 seconds to go from month to month… but it always takes 5 seconds. Going back to a previously visited month is no faster than going to a new month.

Going Further

If you want to learn more about PSOS I highly recommend this article by Vince Menanno: 100x Faster – Flight Testing FileMaker 13. Very well done. Vince rightly points out that there are a lot of things to manage with Perform Script on Server because the server doesn’t have the same state (globals, found sets, the current record, etc.) as the client. We’ve scripted all that for you in the calendar’s PSOS queries.

We hope you find it useful.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Tagged with →  

Leave a Reply

Your email address will not be published. Required fields are marked *

Share →
DayBack Calendar
DayBack's 30-day trial is unlocked so you can customize it and integrate it with your files.
Download DayBack and we'll send you a couple short emails with tips on how to modify it and use some of the coolest features.
Thank you! Please download: DayBack Calendar
Need More?
SeedCode tips & example files in your inbox
Need More?
SeedCode tips & example files in your inbox
Want More?
Be the first to see articles and tips like these
Download TimeZync and we'll send you a couple short emails with tips syncing your FileMaker Go files.
Thank you! Please download: TimeZync
Want More?
Be the first to see articles and tips like these