UI / Data Sync delay variance in timing

I want to pre-face this with, I see the value in AppSheet and I like the platform overall.

I have just spent two days trying to reconfigure and diagnose a very very simple function. I could not figure out why on earth it wasnโ€™t working as expected. After sitting up for a few of the small hours, I took the time to pause and evaluate the delay between the data change and the subsequent UI change and realized there was sometimes a much larger then expected delay. Sometimes 10-15 minutes.

To my absolute dismay, the function I wrote at the start was in fact, the correct solution. The delay in UI regen was the cause of two days of troubleshooting, second guessing, retrying and ultimately a massive waste of time and Iโ€™m sure will be a contributing factor to my future inevitable psychosis.

Why in the holy hell, do some aspects of the UI update in real time but other (probably explainable) but unjustifiable aspects of the front end delay up to ten minutes? When trying to develop on AppSheet it really loses itโ€™s initial โ€œrapid prototypingโ€ appeal when you have to second guess yourself and dig yourself into a state of confusion simply because there is a delay is some aspects of UI regen and others are instant on sync.

I appreciate there is probably a valid explanation for this behavior but I can honestly say, this is the most frustrating framework Iโ€™ve ever had the pleasure if dealing with. It is SO powerful in some respects and so useless in others.

Anyway, if there is an explanation for this behavior I would actually like to understand it a little better to assist with future development.

Rant over.

1 4 152
4 REPLIES 4

The timing (10-15 mins) was consistent?
Where was the expression made?

  • VC โ†’ AppFormula
  • Normal Column โ†’ AppFormula
  • Normal Column โ†’ Initial Value
  • Normal Column โ†’ Initial Value to Reset on Edit?
  • Format rule
    โ€ฆ

Aurelien
Google Developer Expert
Google Developer Expert

Hi @bencarless

Here are a few elements, that may help you.

About settings

  • this may explain the delay on syncing
  • Basically, if โ€œdelayed syncโ€ is enabled (such as in my example), update are happening in the background, slower than when disabled, and slower also then when you willingly click on the Sync button
  • When I make a change, other users of the same app wonโ€™t immediately see the change happening on their device, unless they sync
  • This explains how the data syncing works:
    Understanding the Secure Flow of Data | AppSheet Help Center

About columns

  • Usually Virtual columns are calculated โ€œon the flyโ€, and the calculation time depends on the complexity of the data involved (if there are many parent/children tables involved, sequential calculationsโ€ฆ)
  • Real columns are basically calculated โ€œon edition onlyโ€, unless you create a specific action in order to update the values (letโ€™s say: you open a form)

About expressions

Some expressions are expensive.
If you use nested query expression, such as lookup/filter/select, for example, that could be a part of the response time.
In my case I never had to wait more than 10-15 seconds for calculations to end.

About your issue

Can you describe in which cases do you notice an unexplainable delay with syncing ?

Thanks for the response. Delayed sync is already turned off which did make the UI update based on the data changes in real time. This issue is separate.

The timing is irregular, 10-15 mins is an estimation, earlier today it was only around 3 mins.

Specifically it is for a visibility trigger for two behavior buttons to create a toggle type scenario. The following screen captures should demonstrate the simple logic behind it but feel free to ask any questions, I really appreciate the help.

The confusing thing is that it works straight after sync for other behavior conditions but not this one.

There are two actions, pause and resume. The both rely on the [Paused] VC.

If I click resume, it will sync, refresh and still display the resume button. If I manually refresh straight away it will still show the resume button but if I wait a few minutes (sometimes as along as 15 mins) and hit refresh, it will then display the pause button (which is what is should be doing straight away).

Screenshots as follows:

3X_5_9_59a61483685a00fbab6b6df189e51185a18bd7d0.png

Thank you.

Got it. Your expressions look โ€œlightโ€.
Probably some issue with the mix with calculation/show_If condition, though I donโ€™t really get why you are encountering this delay.

I would suggest trying differently, I hope that can match your need and data structure.

On your Job Cards Table:

  • add a column [Paused], real column type Yes/No
  • add a column [Pause_DateTime] type Change_DateTime, triggered with this [Paused] column
    This way, you will save calculation time (and you still can use what you have for your Pauses table)

Note:
Can you tag me with a โ€œ@โ€ , or click on โ€œReplyโ€ directly from my post.
Otherwise I wonโ€™t see your answer.

Top Labels in this Space