Improve performance of Arcade calculations when OFFLINE

401
7
03-20-2024 05:56 PM
Status: Open
LindsayRaabe_FPCWA
Occasional Contributor III

IDEA: When using an offline map area, default Field Calculations to using the locally stored arcade expressions instead of accessing web-resources, even when not in flight mode. 

USE CASE: When using Arcade expressions in Field Maps to calculate fields, we have noticed behavior that seems really illogical (if maybe intentional). Currently, when you take an offline area in a map and create a feature that contains fields with arcade calculations, there is a delay whilst the calculations (I believe) access web-resources to return the expression then perform the calculation. This is in contrast to when the device is in Flight Mode (completely disconnected) when the calculations instead occur instantly, using locally stored expressions. 

This has become a bit of an issue in the field. Staff take an offline area, and move in and out of marginal and no-service areas throughout the day. With their phone not in flight mode (so that it still receives messages, etc when signal is available), the arcade calcs not only take a long time to happen when signal is marginal/non-existant, but it also has a huge impact on device battery life, draining it a lot faster than it should. 

 

7 Comments
ChristopherCounsell

Do you have any indication that Arcade is causing this? Or is it something else, like attempts to sync data?

DougBrowning

I have for sure seen this also.  We also have the issue where a brief signal will log you out of Field Maps due to expired token but in Airplane more it will stay logged in and not do this.

We now tell all users to turn on Airplane mode before they leave the office and it has helped a lot.  Note older iOS used to then also shut off the GPS on us but newer versions this seems to be fixed.

LindsayRaabe_FPCWA

@DougBrowning good to hear we're not alone. Forced Airplane mode is not ideal when you want your device to still be able to receive communication related data. Makes a case for having a separate device running field maps (i.e. tablet) instead of your primary communications related device. 

@ChristopherCounsell it's definitely linked to the Arcade. It sits there thinking and trying to pull the expression from the web when it can't get a reliable connection. And sometimes this is for multiple fields. Would be chewing up resources on the device. 

ChristopherCounsell
For all arcade expressions?

No leeway in the expression itself to force offline?


LindsayRaabe_FPCWA

@ChristopherCounsell to the best of my knowledge, yes. If the device has the slightest chance of getting a signal, it tries to pull the expression over the web and sits there thinking. If in flight mode though, it does it instantly using locally stored expressions. 

If it's possible to force an offline calculation in the expression, I don't know how to do it!

DougBrowning

You can turn off use of data for just Field Maps in permissions.  I have seen this trick used on Google Maps to avoid recalcing routes so it may work.  Not awesome but an idea.

LindsayRaabe_FPCWA

@DougBrowning interesting - I'll have a look at this today and see how it might work. I wonder if this is a case of turning it on and off as required, as many of our devices don't have access to the corporate wifi network so rely on the mobile data for the initial download. Could work though if not too cumbersome. And, whether it interferes with the "Sync" process as well. At least with flight mode there's a handy shortcut in the devices swipe down menu.