# Fast Api response

**URL:** <https://community.thunkable.com/t/fast-api-response/2655715>\
**Category:** Questions about Thunkable X\
**Created:** [October 21, 2023, 6:27am UTC](https://community.thunkable.com/t/fast-api-response/2655715 "2023-10-21T06:27:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![minamaestro2023kg](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@minamaestro2023kg](https://community.thunkable.com/u/minamaestro2023kg)\
**Post date:** [October 21, 2023, 6:27am UTC](https://community.thunkable.com/t/fast-api-response/2655715/1 "2023-10-21T06:27:12Z")

</div>

Good morning,  
I’m using the current blocks to parse API resposne and populate a data source to br shown on a data viewer list ,

 ![Screenshot 2023-10-21 091934](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/1/8139b3d788369f50968d4f307b1a44467df177f9.png)  
it works fine except for being slow.  
Are there any better strategy for a faster process especially some community members mentioned that there is a better process without giving any details.  
here is the post page  
[What is the fastest way of filling up a local-source DVL from JSON data? - Questions about Thunkable - Community](https://community.thunkable.com/t/what-is-the-fastest-way-of-filling-up-a-local-source-dvl-from-json-data/2457693)  
@kartik14

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [October 21, 2023, 7:07pm UTC](https://community.thunkable.com/t/fast-api-response/2655715/2 "2023-10-21T19:07:29Z")

</div>

can you try this ?  
create a variable, say list\_item and set it to the block i encircled. then insert the set block as first step inside the count loop. of course you can now replace occurrences of the block with the variable list\_item.  
do you have to do all those replacements of quotes to spaces? there are no more quotes inside because json automatically takes care of them for you. so also try your code without enclosing with the text replacement box. see if it speeds it speeds it up a little. (ie, do not do text replacement)

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

actually you can still do better.  
build the list , say data\_list, BEFORE the count block - then adjust remaining blocks accordingly.  
i hope this helps.

---

<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:** [October 21, 2023, 10:28pm UTC](https://community.thunkable.com/t/fast-api-response/2655715/3 "2023-10-21T22:28:30Z")

</div>

In addition to what @manyone suggested, you are using a function block (“list of values in”) inside of a loop so every time the loop iterates, it has to get the full list of values in the Category column again. Instead, set a variable to that list of values block before the loop starts and then use the variable where you currently have the “list of values in” block inside your loop.

---

<div class="post-metadata">

**Author:** ![minamaestro2023kg](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@minamaestro2023kg](https://community.thunkable.com/u/minamaestro2023kg)\
**Post date:** [October 21, 2023, 10:43pm UTC](https://community.thunkable.com/t/fast-api-response/2655715/4 "2023-10-21T22:43:30Z")

</div>

@tatiang  
Dear could you please send me the blocks image, if possible.  
It’s a little difficult for me to fully digest what you say.

---

<div class="post-metadata">

**Author:** ![minamaestro2023kg](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@minamaestro2023kg](https://community.thunkable.com/u/minamaestro2023kg)\
**Post date:** [October 21, 2023, 10:45pm UTC](https://community.thunkable.com/t/fast-api-response/2655715/5 "2023-10-21T22:45:48Z")

</div>

@manyone  
I have to do text replacement as the normal Api response give results in quotation mark, as any image link in Quotation mark will not be displayed.

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [October 22, 2023, 5:20am UTC](https://community.thunkable.com/t/fast-api-response/2655715/6 "2023-10-22T05:20:16Z")

</div>

It may be faster to use the substring block from 2 to last minus 1. The replace all has to check every cell before replacing it if needed. But you already know where those quote marks are.

---

<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:** [January 20, 2024, 5:20am UTC](https://community.thunkable.com/t/fast-api-response/2655715/7 "2024-01-20T05:20:24Z")

</div>

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