Many variables make App loading and response slowly

Hello.
Sorry poor English.

I’ll try to make collection App.
Could you advise me?

App overview
1.Display item lists.
2.Tap the item.
3.Marked on it. (e.g " :heavy_check_mark:collected !") And save it.

I created App the following…
1.Place Row or Container,and set the image of items on Background Image.
1
2.Place the marking image (like " :heavy_check_mark:Collected!") as Image on Cell.
3.Set Visible config of the Image… “IF(data.xxxx.get,true,false)” .
4.Set logic of cells…

So, I set DATA VARIABLE(Client side strage) each one of items.


As a result, a large amount of data variables was made (over 100 items) , and make App loading and response very very slowly… :face_vomiting:

uh…should I do? :face_with_monocle:

Every data variable includes separate logic to poll the data source by default, so with that setup, you have 100 loops that get new data from the client-side storage every 5 seconds. Definitely something that would slow things down!

What you should do is use the Collection of data records data variable type, so you get all items in your storage with one call.

Then, you use the Repeat with property to render one UI component per item in the array. You can then use the Currently repeated property value binding type to access data from the clicked item. See https://docs.appgyver.com/app-logic/binding-data#repeated-components for more details.

Hope this helps!

Thanks for reply!!

100 loops that get new data from the client-side storage every 5 seconds.

Dou you mean following it , right?
4
5
I’ve understanded it,I set 5000ms=>100ms before submit this topic.
As a result,it was temporarily resolved,but the problem recurred after setting a lot of variable.
I heard your advise,I think “Loop” makes slow things down,I should remove it too.
So,I’ll try stopping all loop, and set logic that update data/set variable when user click the item.

Then, you use the Repeat with property to render one UI component per item in the array.
You can then use the Currently repeated property value binding type to access data from the clicked item.

Sorry…I tried it but it doesn’t work as I expected . :sob: