I'm starting to use PSoS, but find that it's not always the better option. I've set up some tests using about 10,000 records, with widely varying results. For example, whilst Replace Field Contents is much quicker via PSoS (about 6 x), a loop is more than 2 x slower.
Can anyone point me to a listing of which operations are likely to benefit from PSoS, and which to keep on the client? I certainly don't want to slow the application down by using PSoS, but nor do I want to have to test every operation before moving the script to the server.
Thanks,
Dave.
Dave:
It's not as simple as "here's a list of functions that will be faster with PSOS". Much is going to depend on factors such as your server hardware, server load, etc. Also, when you compare PSOS vs. running the script in a FM Pro Client, where is the client running from (WAN, LAN). How much data is being loaded and manipulated by the script. One important thing to keep in mind with PSOS is that each script you run is essentially doing a login, startup, run script and log off. There is overhead in these actions. Be sure that you are not running a normal "startup" script that would be appropriate for a regular user, vs. something that may be much more abbreviated for the purposes of running a PSOS script. Try not to make multiple PSOS calls if the scripts can otherwise be combined in one PSOS call.
If you have some more specific examples, we can probably provide more ideas. I would be very careful using Replace Field Contents on PSOS. THe script can easily get stuck on locked records. With PSOS it is import to do good error handling and hand back issues via the return script parameter. PSOS is generally faster, especially in WAN environments, but there are many exceptions.
Kind regards,Lee