Hello AppSheet Community,
I am seeking advice on improving sync performance for an AppSheet app connected to a Google Sheet that is experiencing slower sync times due to increased data volume. The app captures a 'Scan Code' for each new entry and verifies its uniqueness against all existing entries.
Current Approach:
Issue:
Expressions Used:
Questions and Potential Solutions:
I am considering all viable options to achieve a balance between real-time data updates for dashboard purposes and efficient app performance during data entry.
Thank you for your insights and suggestions.
First, in the Sync error dialog box, you need to tap on the "View Error Details" button to see what messages you are getting.
When it comes to Sync performance issues, assuming connectivity is good, there are really two main things that contribute to slowness:
1) Amount of data in the app
2) Process intensive Virtual Columns - i.e. expressions that scan tables - especially multiple table - and select Lists of data.
Your Initial Value expressions are run only when a new row is added and DO NOT contribute to Sync time.
Suggestions to improve Sync Times
Since #1 above also contributes to #2, the quickest, easiest way to speed up the performance is to reduce the amount of data that needs to be downloaded into the app. And the easiest way to do that is to remove older, no longer needed rows.
Many times an app needs data for only a day or two and then can be physically deleted/purged. This can be done manually or you can create an automated process to purge the data on some schedule - in the app or with something like Google Scripts.
If you can't purge data, then maybe you can filter it. AppSheet uses Security Filters to limit, by table, the data downloaded to a device. Only the rows meeting the filtering logic are downloaded.
Keeping the downloaded data size small is essential to maximizing the performance of Syncs.
You also want to avoid any lengthy Virtual Column calculations. If you don't know, Virtual Column are re-calculated on each Sync. Don't mis-interpret this. It does NOT mean to avoid Virtual Columns. They are necessary and you will likely need Virtual Columns as you build out your app. What you don't want are lengthy Virtual Column calculations that are performed on every Sync when the data doesn't change or at least doesn't change often.
Question
Where does the Scan Code come from and how is it used?
Scan Code comes from a form in the app and it takes input from a barcode scanner.
I have a doubt. Isn't the data only downloaded when the app is loaded/opened? The sync issue I faced was in saving the form view's entry. Even now, every barcode entry takes 2 seconds to sync to Google Sheets. In the beginning, it used to happen almost instantly.
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |