Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4815 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a fairly strong development background but I am relatively new to FMP. I have developed a fairly complex DB which performs very well locally and via IWP. I am hosting my application/DB at a well known FM Hosting Service and have been very pleased with their service and support.

I have only ONE script that is a problem. That Script uses the "Duplicate Records" function to create 40 records. It will never be more than 40 and may actually be a few less but for the sake of argument - it generates 40 duplicate records. I have done a lot of reading and I fully understand the issues around connectivity, block sizes, bandwidth, latency and most of the other factors that go into remote DB performance.

I have written a Test DB (attached) with a "Duplicate Records" Script that models the problem. When run locally the Script completes in under 2 seconds. Same when run via IWP. When run via remote client the script takes almost 20 seconds. When run remotely the script appears to generate 5-8 records (on the host) and then sends them to the client. The process is repeated as many times as it takes to duplicate the 40 records. THIS IS SLOW...

As I said, I DO understand ALL the issues around interprocess communications - my question is: are there any techniques to "force" the host to create all the records BEFORE updating the client? Is there a way to generate the records "in the background" before displaying the layout that displays the records in question?

I understand this is a strange issue and the first question is - Why would he ever be duplicating that many records? Sorry, that is not the question. I understand there might be better data structures that would not require this process. The question remains... are there any ways to "tune" FM Server (or even the client) to allow a larger number of records to be generated before sending them OR is there a way to generate all the records before sending them to the client?

Sorry for the long post -

Thanks!

Gayle

TestDB.fp7.zip

Posted

A few suggestions:

1. Use Freeze Window before loop operations

2. Use Form View when performing loop operation

3. Put the loop exit condition as the first step inside the loop and build your logic to support this placement

4. Simplify the comparison operator by using > rather than >= and modify your counter start and end to accommodate this.

5. Another small gain will result from using a single calculation with a LET statement in the exit-loop calc.

TestDB.fp7.zip

Posted

Thank BruceR... I appreciate your suggestions!

You're welcome. You downloaded the modified example also?

This topic is 4815 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.