# Ideas to speed up my app?

**URL:** <https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997>\
**Category:** Ask for Help\
**Created:** [May 12, 2020, 8:34pm UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997 "2020-05-12T20:34:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madaleno](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/madaleno/32/7177_2.png) [@Madaleno](https://community.glideapps.com/u/Madaleno)\
**Post date:** [May 12, 2020, 8:34pm UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997/1 "2020-05-12T20:34:41Z")

</div>

Hi everyone! first time posting here, I’ve read many posts already and they have been very useful but I need guidance about this issue.

I’m creating an app that makes a nutritional plan according to the user, they send their details through a form and can edit whenever they want.

I have a sheet that calculates their caloric needs and according to that needs creates a plan to lose weight, maintain or gain weight.

Problem is: through the google sheet I’ve made it so far using many IFS formulas (choosing either to lose weight, gain weight, maintain and the nutritional plan they want -there are three kinds-) on top of that in regards to which week the user is in (plans last 8 weeks), the app through another big big IFS decides which image to show.

I don’t know if it’s because of connection lag or too many calcs to resolve before the apps shows results but the user feeling is terrible, it takes about 10s to update the data and maybe more than a minute to show the image. I started doing with math columns (which show data instantly) via data editor but I need sooo many columns that I have the feeling that this must have a better solution. What do you guys think?

Thanks everyone!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 13, 2020, 12:31am UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997/2 "2020-05-13T00:31:43Z")

</div>

Sounds like a calculation complexity problem, how many IFS did you have in your nested formula in the Sheets?

---

<div class="post-metadata">

**Author:** ![Madaleno](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/madaleno/32/7177_2.png) [@Madaleno](https://community.glideapps.com/u/Madaleno)\
**Post date:** [May 13, 2020, 12:47am UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997/3 "2020-05-13T00:47:31Z")

</div>

Not so many but the ones I have are very long formulas, something like:

IF gender = “male” AND activity level = “loe” AND goal = “lose weight” AND calories needed are \<2000 AND \<2500 AND diet = “low carb” then X

And so on for the 2 choices for male/female, caloric ranges from 1250 to 3750 every 500cals, 3 kinds of diets, 3 types of goals, 3 activity levels, 8 weeks… one more similar formula to choose one image or another… quite messy, formula is not exactly like that of course but I hope you can get yourself an idea!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 13, 2020, 1:44am UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997/4 "2020-05-13T01:44:35Z")

</div>

How many scenarios do you have in total? How about making a sheet that contains:

- Column A: Specific scenario - let’s say “Male - Low - Lose Weight - Calories \< 2000”
- Column B: Intended outcome - “Link to image”

Then when a user fills your form, concatenate his/her inputs and then use a simple vlookup to get the intended image?

---

<div class="post-metadata">

**Author:** ![Madaleno](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/madaleno/32/7177_2.png) [@Madaleno](https://community.glideapps.com/u/Madaleno)\
**Post date:** [May 13, 2020, 2:08am UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997/5 "2020-05-13T02:08:17Z")

</div>

Let’s see, it works like this:

You fill out the form:

- Age
- Weight
- Height
- Gender
- Activity level
- Goal
- Dieting preference

App calculates your caloric needs according to: age, weight, height, gender and activity level.

Then calculates your:

- Calories
- Proteins
- Carbs
- Fats

for an 8 weeks long plan (so different calcs each week) aaand your dieting preference:

- Zone diet
- Low fat
- Low carb

and different goals:

- Lose weight
- Maintain
- Gain weight

(This makes different math for wether you want to lose weight or gain, one diet or another and the week you are in)

Here you have the app in case you wanna see, it might help understanding the needs:

[https://drzxv.glideapp.io/](https://drzxv.glideapp.io/) (only low fat images are shown at the moment)

Thanks for reaching out!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 13, 2020, 2:18am UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997/6 "2020-05-13T02:18:49Z")

</div>

I have just tested it. I would say its flow is very well organized and it generated pretty quick. As you have mentioned you’re currently using Glide’s Math column for this?

I don’t think speed is an issue anymore, at least from my experience. How many Math columns are you using to achieve this?

---

<div class="post-metadata">

**Author:** ![Madaleno](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/madaleno/32/7177_2.png) [@Madaleno](https://community.glideapps.com/u/Madaleno)\
**Post date:** [May 13, 2020, 2:32am UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997/7 "2020-05-13T02:32:55Z")

</div>

Did it? I haven’t changed anything yet, I have math columns for the starting values of carbs protein and fats, the rest comes from the sheet.  
Sheet calculates the total calories, then math columns for the partitioning and sheet again to choose proper values according to the user.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 13, 2020, 2:59am UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997/8 "2020-05-13T02:59:35Z")

</div>

![ezgif-1-59681b25e829](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/8/8253a5a7301878d7944ae7a8d6545f15de383ead.gif)

I attached a video of my experience, that was pretty fast I think. Any comments?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 13, 2020, 3:34am UTC](https://community.glideapps.com/t/ideas-to-speed-up-my-app/8997/9 "2020-05-13T03:34:48Z")

</div>

The best way to speed up any app is to use Glide data columns rather than spreadsheet formulas. Spreadsheet formulas = lag. Data columns = instant gratification 😁

I talk about this a bit here:

> [@Creating a gamified in-app store/inventory](https://community.glideapps.com/t/creating-a-gamified-in-app-store-inventory/4225):
>
> Hey all. Wondering if anyone has a solution: I want to create a shop that would display items that users could purchase with in-app currency. Once purchased, they would show up in the player’s inventory…when using an item, the item would disappear. So far, I’ve managed to: 1.) Allow players to purchase items 2.) Display purchased items for each sign in user 3.) Deduct item cost from current balance for each user 4.) Allow users to “use” an item (which then gets removed from inventory) T…
