Firebase retrieval speed test

Yes, this delay is understandable. You are using stored variable which has a similar mechanism to those of cloud variable. Essentially those variable will verify and pull data from your device’s storage which are much slower that app variables

If you hold the stored variable value in an app variable and compare it then you will see a huge performance in time. Doing that, however, will require a kind of management approach to keep the main function of stored variable which are to retain values between sessions.

2 Likes

Thanks. That stored variable is not crucial to the app’s operation. I can transfer the value to an app variable to use in that loop and then just save the value to the stored variable as needed.

1 Like

So… interesting update: I was seeing my app take 6.8 seconds to load 25 photo+text entries from Firebase. I timed various block combinations within my “for each item j in list” loop and found that the retrieval blocks were only taking 1 second. The remaining 5.8 seconds were taken up by this little block:

image

I had added it because it seemed to slow down the loop a tiny bit (or so I thought!) and allow the data to be synced properly without missing anything. But removing it speeds things up dramatically and so far… the data seems to be there as expected.

1 Like

Thunkable updates the screen when it hits a wait block, doesn’t it? So you were perhaps doing an extra 25 redraws on a complicated screen, rather than once at the end when the loop finished.

2 Likes

I think I’m going to have to give up on cloning components. I just tried using a built-in Data List Viewer layout and it was so blazingly fast that I’m just going to stick to that for now.

1 Like

Sorry to hear that. I have a project with buttons as part of each list item - hoping it won’t be too slow. :slight_smile:

1 Like