# Firebase GET speed

**URL:** <https://community.thunkable.com/t/firebase-get-speed/1780980>\
**Category:** Questions about Thunkable X\
**Tags:** firebase\
**Created:** [March 12, 2022, 11:43pm UTC](https://community.thunkable.com/t/firebase-get-speed/1780980 "2022-03-12T23:43:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 12, 2022, 11:43pm UTC](https://community.thunkable.com/t/firebase-get-speed/1780980/1 "2022-03-12T23:43:02Z")

</div>

I’m trying to speed up this loop to retrieve Firebase data:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/1/11a4c64572f28f82b29f002edb760ecaabbe0cd7.png)

It takes about 2.5 seconds to complete the loop.

I tried assigning an app variable to the data to avoid repeatedly accessing Firebase:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/3/a3590361bee2592777e7517393b0285f902e03a2.png)

The loop now takes less than 0.25 seconds but it’s not retrieving the data correctly. I’m unsure how to reference something like Homeooms/4Y/Students using a “get property of object” block. I thought I had it right but clearly I don’t.

This is the Firebase data structure:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/b/9b306456be8364edc80829a4f4cfba775153fefd.png)

I’m using my own post as a reference point: [Firebase retrieval speed test - #7 by tatiang](https://community.thunkable.com/t/firebase-retrieval-speed-test/1296904/7)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 12, 2022, 11:54pm UTC](https://community.thunkable.com/t/firebase-get-speed/1780980/2 "2022-03-12T23:54:01Z")

</div>

Yes, I always get into this trap. The `get object properties of` block generate a single level list and therefore the `j` loop variable is just a simple text entry of the key name (1B, 1C, 2B, …) without any data under it. It is not an object anymore, This is why you cannot get any property from it. so this  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/4/14047b17af4d358dab705c1b3d2e1967d0e64601.png)  
evaluates to **null**.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 12, 2022, 11:57pm UTC](https://community.thunkable.com/t/firebase-get-speed/1780980/3 "2022-03-12T23:57:09Z")

</div>

Yes, good point. I hastily made that second attempt this morning. I need to rethink how I’m going to access the data without multiple Firebase calls.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 13, 2022, 12:01am UTC](https://community.thunkable.com/t/firebase-get-speed/1780980/4 "2022-03-13T00:01:20Z")

</div>

> [@tatiang](#):
>
> I need to rethink how I’m going to access the data without multiple Firebase calls.

The issue with this code is that you want to mix between two different way to refer to properties in an object.

Use a `get property` inside a `get property` and it should work.

```auto
get property students of get property j of homerooms

```

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 13, 2022, 12:09am UTC](https://community.thunkable.com/t/firebase-get-speed/1780980/5 "2022-03-13T00:09:18Z")

</div>

That worked! Thank you, @muneer! 🙏

And it only takes 0.2 seconds now.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/ed1c10fd1df6a7b6bf59a434acef284e7d2016a9.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 13, 2022, 12:21am UTC](https://community.thunkable.com/t/firebase-get-speed/1780980/6 "2022-03-13T00:21:14Z")

</div>

@tatiang , I have to apologize. I advised to add a second `get property` block while it was easier to change the `join text` block you were using from **/Students** to **.Students** which should work with a single `get property` block.

It’s **3am** where I am so I’m not in my clearest of mind.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 13, 2022, 1:26am UTC](https://community.thunkable.com/t/firebase-get-speed/1780980/7 "2022-03-13T01:26:41Z")

</div>

Ah, yes, I was so wrapped up in Firebase paths that I was using / but now I recall that . should work well. I’ll try that. Thanks again.

Yes, that works too:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/1/a187fec028bc1d89bb85fcb03b7f28053d0e7c3c.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [June 11, 2022, 1:26am UTC](https://community.thunkable.com/t/firebase-get-speed/1780980/8 "2022-06-11T01:26:51Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
