Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Loops in FM 13 very problematic

Featured Replies

Hi

 

We (our company) have just noticed that loops in FM 13 is acting very strange. 

 

We setup a simple db-file on our 13 server (v5, windows server), to test a rising suspicion - (polling) loops work bad.

 

We compared loops and on timer script, with and without pause.

 

We let the script run for 15 minutes and did a count on how many iterations each setup managed to run during that time. The script is based on two clients - one that creates record, and the other reads and writes to the created record. The first client creates a new record when it sees that client number two has written to the last record.

 

1. 0,5 s delay, no loop, onTimer   451
2. no pause, no loop, onTimer   459
3. 0,5 s pause, no loop, onTimer  448
 
4. 0,5 s pause, no loop, reinvoke  28
5. no pause, loop     341
6. 0,5 s pause, loop     444
 
The first three is with onTimer. We tried 0.5 seconds of delay in the timer, no delay and also added a pause in the script with no delay on the timer. All three manages approximately the same number of iterations.
Number 4 is with a recursive call to itself - it crashed after 28 iterations.
Number 5..6 are done with loop. The difference between 5 and 6 is a 0.5 second pause. Notice that WITH a pause, we manage MORE iterations than without.
 
This might already be very well known to many of you, but the reason we did this test is that some of our customers experience very slow response very randomly on a part in our system that is based on a polling loop with a 0.5 second pause. We have wpe script calls that writes to the DB, but the polling/looping clients sometimes does not notice this write, right away as expected. It can take up to 10 seconds in several cases on LAN and over a minute over WAN.
We changed the loop to on timer script variant instead and that problem dissappeared. 
 
Since then we looked through our solution on other polling loops and noticed that we have random big delays on every one of them when we try to read a value thet already should be there. The random delays exist on every customer we have checked, that runs 13 clients. We are in the process of timing 12 clients also to see if the problem exist there too.
 
Unfortunately we did not get those random big delays on our simple test file.
 
Anyone else experienced this or have input that might shed light on this matter? 

Are you using ExecuteSQL to "poll"?

  • Author

Wim: Ok, We kind of hoped/assumed that by polling a specific relation, that FM would update that value more or less instantly - obviusly not. That's a very nice suggestion, thanks!  Unfortunately, even there, we have random delays. We now think that the size of our database and/or relationship graph in this GUI file, might cause FMS to have trouble updating out to client. I will have to try to have the hidden window open up a separate file containing only the needed table, to perhaps make the work of FMS a little easier.

 

What we also noticed on our hosted solution (WAN) is that clients on a really bad internet connection never get theese delays, only clients on very good connection have the delays (LAN included). - Super strange! The client on bad connection instead gets the more understandable delays on other parts of the solution.

 

Fitch: Not sql at the moment, but it makes no difference with the delays unfortunately (we tried).

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.