Speed optimization

what to do to increase our speed of live app like if i update the value it take time to reflect on live app any suggestion?

Are you on a Free plan or a Pro plan? How many rows do you have?

Pro plan
Rows 75
Images from Google take a very long time to load.

basic plan and we have 200 rows per sheet

Preferably you would move any calculations into glide columns so they calculate instantly in real time directly on the user’s device instead of values having to sync from the app, to the glide server, then to the google sheet, where it calculates and returns the value to the glide server and then back to the app. If the sheet calculations happen quickly enough, the values should be returned to the app within 5 seconds or so. If they take longer, then the resync may miss the updated values. Under a free plan, a data change has to be initiated from the app before data from the sheet will be resynced with the glide database. If you have a pro plan, then you can turn on a background refresh option, but that will only check for updates every few minutes.

But…I believe @Pooja_Kumar is your teammate and has indicated that your team did not want to move any logic into glide and preferred to keep the calculations within the google sheet, so I’m not sure what to suggest. To make my apps as fast as possible, I usually move as much logic into glide as possible. If you care to share your formulas, then we could determine if it’s possible to move those calculations into glide and make the app much more responsive.

5 Likes

thank you so muchhhhhh

1 Like

Hi @Jeff_Hager! Thanks for you response. Had a few follow up Qs, wld b great to have your response:

  1. Is there a time out wrt the time the edit is intiated on the app & the data is fetched? If yes, how much is that? (For eg. if I change a value in the app & it is taking 10secs for the GSheet to calculate the output & the Glide time out is at 5secs, I may not get the updated value.) And is there a way to increase it?
  2. What actions on the app (besides edits to input values) trigger sync/refresh. Eg, is swapping between screens a trigger to sync as well?
  3. Can we put a refresh button on the screen UI, so if values aren’t auto updated, the user can self trigger
  4. Anyway for the App GUI or the App Business logic to proactively request for a resync/refresh
1 Like
  1. You have to wait for GS to update and then glide to synchronize with GS. That’s why there’s a delay. You should try and move any GS calculations to glide computed ones and it will be much faster.

  2. Edits and add rows should force a re-synch, changing screens will not.

  3. There is no native refresh option you’d have to get creative.

  4. I believe the app refreshes automatically every 4-5 min. Again you’d have to be creative to force the refresh.

5 Likes

To add to Eric’s great answer, a way to force a refresh is to create a button to increment a dummy value somewhere in the Sheet. It counts as an edit from the app, so it will force a refresh, I have tried this before.

5 Likes

:point_up:. Pretty much what they said. But just to add:

  1. No you can’t tell glide to wait longer for calculations to occur. I’m not exactly clear on their logic or how it works, but in past experience, I’ve had sheet calculations that took up to several minutes to process, so obviously they didn’t show up in the app immediately. I have since found ways to make those calculations much more efficient and most of that logic was moved into glide, which gave me much better response time. There’s still a few things that I can still only do in the Google sheet, but what I’ve done so far has made my app much more responsive compared to how it worked a couple years ago.
  2. You could create a custom action that would update a column before going to that screen. But you don’t have access to any actions when navigating between tabs.
  3. Depends on how you want to initiate a refresh. Basically you have to find a way to update a value that will cause a sheet resync.
  4. I don’t have anything to add to @Eric_Penn’s answer.
4 Likes

Thanks a ton for the responses above. We will evaluate & execute.

I always create my own loading page, then call the if statement above the fold. This helps it to load first

1 Like

@Jeff_Hager thanks for your suggestions.
We added a Sync button & that has helped improve the response Speed.
However, the update still takes 30 secs+ when initated from the mobile. We are now evaluating moving our logic to the Glide Table. Wrt that, would like to know the following:

  1. What is the likely impact on response speed were we to do that? How fast could it be (vs say 30 secs today)?
  2. Can we simply copy paste the formulae/ Data from GSheet to Glide Table or do we have to re-input each formulae?
  3. Our current GSheet is quite complex - It has 28 sub-sheets with some sub-sheets having 400 columns. Hence, we have not been keen to move the logic. How easy or tough do you think it would be to transfer the same to Glide Tables?
  4. Does Glide support all formulae in GSheet (e.g. HLookup, VLookup etc)
  5. How does the transition work? Currently source is GSheet, how do we switch to Table if/when we were to code there
  6. Since we have Live users on the app, how will the transition work? Will some screens be connected to sub-sheets, while we work on transferring the logic for some screens/sub-sheets?
  1. How fast can you blink your eyes? Calculations would happen directly on the user device rather than waiting for data to sync from app → to glide → to google → calculate → to glide → to app.
  2. You could use the Glide Hyperformula column • Glide , but I personally would rebuild the logic using the glide native columns.
  3. You can keep the data in a google sheet, but just move the calculations into glide. It would probably be a lot of work to migrate all of the data to Glide table.
  4. Again, check out the Hyperformula column • Glide plug-in with an experimental code column.
  5. If you switch to a glide table, you would probably have to rebuild screens and logic. But you can add glide tables to any app.
  6. You can use publishing control as long as you aren’t altering any data or columns in existing sheets that are being used by the live app. Otherwise, I will play with visibility controls or filters to hide new features that I’m working so only I can see them while I work on it. If it’s a large change, then it might be better to make a duplicate, then work on the duplicate until it’s ready, then swap the app url.
2 Likes

Thanks @Jeff_Hager for your prompt response. Request some clarrifications to your suggestions:

  1. Wrt to using Hyperformula column plugin (Hyperformula column • Glide), we are still to figure how it works, but I suppose it will help us copy the logic/formulae freom GSheet to Glide Table?
    2 Since you’ve mentioned you’d prefer rebuilding the logic using Glide Native Cols (vs. Hyperformula col), wanted to understand your reasons so we bear those in mind too.
  2. Wrt keeping the data in GSheet & Moving calculations to Glide, not sure how that works. Could you give an example?
  3. Further we have very minimal static data - possibly 10 cols/fields only, rest of the info is dynamic where output from a calculation, feeds as an input to another, so even if there is a way to keep data in GSheet & Move calculations to Glide, don’t think that will solve for 99% of the problem, but wld be good to know how that works anyways
  4. Pls. explain how the transition from Sheet to Table works. We’d assumed we will have to compute the logic in the existing cols. & somehow delink from Sheet, but I think that’s not feasible?
  5. If we add Glide Tables to existing app & compute the logic there, we will need to duplicate the screen & re-link the new screen components to computed cols. in added Glide Tables, correct? That or add new cols, in existing Tables (currently linked to Sheets), compute values, link components to these & delete sheet linked cols, will this work? Both seem complicated, any better solution?

I suggest to do all calculations in glide columns, and if you need them in Google sheets, just create separate formulas there. And don’t use them in any glide screen or calculations, is just for gs purposes

  1. I use glide columns purely for speed. Even waiting 1 second for a value to calculate is too long in my opinion. When I can see numbers recalculate as I’m typing, that is a much better experience. Also, the experimental column is just that…it’s experimental. I don’t feel comfortable committing fully to something that is experimental. Others have been having some good luck and other have had bad luck with it. If you want to try it, the hyperformula column recognized Excel and/or Sheet formulas. It might not do everything though, but it would allow you to copy and paste formulas with some restructuring to point to the correct columns values.

  2. What do need from an example? All you do is add a glide column (a math column for example). You can add it to a google sheet in the glide data editor, but that math column will only live in glide.

  3. It’s ultimately up to you. How much needs to be in the google sheet vs glide. The trade-off for all logic in the google sheet is speed and user experience. I think you’d be surprised how much you can do within glide.
    Some things are harder and some things are much easier. You can duplicate some or all of the logic so some or all calculations happen in glide as well as the sheet. Then you get front end speed as well as having the numbers in the back end.

  4. & 5. Same as above. It’s up to you what you want. The longer you hold off on building logic in glide, the harder it’s going to be once your app is in production. No it’s not easy, and yes you would most likely have to recreate a lot of tables, columns, and screens.

It’s been suggested a few time to your team to build logic in glide to get better speed. There has also been very little shared in regards to what kind of logic you are trying to accomplish, so it’s hard to give suggestions or advice what can or should be done in glide, or how data can be most efficiently structured. The one little piece I saw a few months back looked like a very simple calculation where a couple of values were altered on the screen an gave an updated result. To me it didn’t look complicated. That might be a good place to duplicate logic. Keep it in the sheet, but duplicate what needs to be shown in the app, so if a user types some numbers, it recalculates instantly as they type.

4 Likes

Adding to @Jeff_Hager excellent response… “Find all uses” is your best friend.

I’ve moved hundreds of GSheet formulas to Glide computed ones. Once you’ve moved the logic from GSheet to Glide, use find all uses on the old column, click the little arrow and replace old columns with new ones.

It’s worth the effort.

4 Likes

Thank you so much, this helps a lot. Although I would like to know one more thing- would adding the Zapier API to the app help in resyncing data faster? Or does it just combine multiple operations to be performed at a single tap?
And I just want to confirm, you are basically saying that the best solution is to transfer all logic from GSheets to the Glide tables right? Is there any way to do it efficiently, as we have too many back-end and front-end subsheets, and the datasets are very big.

Adding the Zapier API to the app won’t make a difference. It only sends data outside of the app to trigger a zap. It does not bring data back in. It may or may not kick-start a sync process sooner depending on if sheet data is updated from the zap, or if data is updated in the app (which would trigger a sync anyway). Either way, there is still going to be a delay. Either you choose to build the logic in glide and have it calculate instantly directly on the user’s device with zero wait time, or you choose to have the logic in the Google sheet and wait for data to go from app → to glide → to google → to glide → to app.

No, I am not saying that all data needs to move to a glide table. You can move it if you want, but at the very least, leaving the data in the google sheet and moving calculations and formulas into glide computed columns will make a massive improvement to the user experience because there will be no wait time.

There is no easy way migrate data and/or formulas and there are no shortcuts. What I’ve done with my app is to move small pieces of logic into glide slowly piece by piece. It’s made huge improvements on the response of my app. You don’t have to move everything, but if there are parts of the app that are causing the most issues, then start there and see if you can make it more efficient.

Again we can only give general advice since your team has not shared much in regards to the logic that is causing problems and what exactly is slow.

5 Likes