# How does the blocks execute

**URL:** <https://community.thunkable.com/t/how-does-the-blocks-execute/656288>\
**Category:** Questions about Thunkable X\
**Created:** [July 4, 2020, 11:14pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288 "2020-07-04T23:14:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [July 4, 2020, 11:14pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/1 "2020-07-04T23:14:17Z")

</div>

It seems that my function block “Farver Kolonne 1” is not executed sequentially for each loop in the Count with j loop.  
Could it be true that the execution is not waiting for “Farver Kolonne 1” to return in each loop, before continuing the loop?

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

Hereunder is the “Farver Kolonne 1” function block refered to above. Is it a problem with 3 count with block inside eachother??? They are about 10 to 16 count each. The execution takes several minutes.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4d8dddce7107cd81e823680a49ff7682bf15a79b.png)  
Its working but takes way to long time to execute.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 6, 2020, 12:35pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/2 "2020-07-06T12:35:56Z")

</div>

Purple asynchronous blocks are not required to run sequentially.

---

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [July 11, 2020, 10:32am UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/3 "2020-07-11T10:32:59Z")

</div>

Dont anyone have a comment to the slow execution for these blocks. It takes so long time to execute.  
Please

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 12, 2020, 1:41pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/4 "2020-07-12T13:41:51Z")

</div>

See [http://droidscript.ru/main/statyi/thunkablex\_base11.php](http://droidscript.ru/main/statyi/thunkablex_base11.php)

---

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [July 16, 2020, 10:39am UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/5 "2020-07-16T10:39:04Z")

</div>

I now have tested this isue. But no matter what I do the time to clone 50 empty button in af row takes almost 1 minute inside my ap. I du this as the first thing when the screen opens.  
If I make a new app with the same block to copyin a row it works fine and is very fast.  
What can slow this function so mutch in my app The strange is that it is the first thing I do…  
On the picture i start repeating the clone block as the first thing. But it takes almost a minute to clone.  
It work the same way without the timer…

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

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 16, 2020, 1:55pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/6 "2020-07-16T13:55:24Z")

</div>

Why do you use button cloning in a timer? What is this opens function? It seems to me that you are doing something wrong, so it turns out 1 minute. Turn off all blocks on the screen and only clone 50 buttons when opening the screen. The “tom” component is a button? Do you use “Starts” block or only “Opens”? Maybe the timer is cyclical?

---

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [July 16, 2020, 2:59pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/7 "2020-07-16T14:59:07Z")

</div>

that was a test regarding to the link you sent earlier. But that didnt work. But now I found out that wit a little wait on 0.01Sec in the cloning block help a lot.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/8/48dd0a402d6f5c85ae7f9741a96a8373bde9c9f7.png)

But now i like to know if it is not possible to have more count inside each other like this. Becaus it seems like it stays inside the Count with X block and dont count the I and J block. How can I solve that?

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

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 16, 2020, 3:43pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/8 "2020-07-16T15:43:22Z")

</div>

Unfortunately, I can only say one thing - in correctly working blocks, you do not need to use a delay block. If a delay block is required for the blocks to work correctly, then either there is an error in the algorithm or there is a problem in the platform core. Unfortunately, at the moment I see a problem in the platform core and for this reason I stopped any consultation before fixing it. Using delay blocks to solve problems with the operation of blocks leads to the creation of unstable applications, and as a programmer, I do not see the point in creating such applications.

---

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [July 16, 2020, 4:26pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/9 "2020-07-16T16:26:12Z")

</div>

> [@actech](#):
>
> Unfortunately, at the moment I see a problem in the platform core and for this reason I stopped any consultation before fixing it

Actually it is not the delay block i worrie abboud. But I dont get out of the Count X block. Do you have a work around for that???

When you write " Unfortunately, at the moment I see a problem in the platform core and for this reason I stopped any consultation before fixing it"  
Is that correct that it is a problem on your side that you will fix??

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 16, 2020, 5:10pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/10 "2020-07-16T17:10:12Z")

</div>

> Actually it is not the delay block i worrie abboud. But I dont get out of the Count X block. Do you have a work around for that???

Let’s take it in order. I see the “wait” block in your blocks. Why do I need it in a properly compiled algorithm? Do you use this block to make the app run slower? Personally, I can’t give an example of the need to use the “wait” block in applications.

Second. If you do not exit the x loop, then you need to make a minimum number of blocks to check what it turns out. There are only two possible errors: either an error in your algorithm, or a bug in the system.

> When you write " Unfortunately, at the moment I see a problem in the platform core and for this reason I stopped any consultation before fixing it"  
> Is that correct that it is a problem on your side that you will fix??

I am not a developer of Thunkable X and for this reason the problem can’t be on my side. After several recent updates to thunkable X, I came across the fact that for the block to work correctly, it is necessary to use the delay block. From my point of view, this is a big problem. (First) the Blocks must work reliably without any delays, or if the blocks do not have time to perform the operation. then you need a (Second)block event, which can be used to determine the successful completion of the operation. This is not the case, and I do not know how to create reliable applications in such conditions.

---

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [July 16, 2020, 5:19pm UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/11 "2020-07-16T17:19:18Z")

</div>

> [@actech](#):
>
> > i worrie abboud. But I dont get out of the Count X block. Do you have a work around for that???
> 
> Let’s take it in order. I see the “wait” block in your blocks. Why do I need it in a properly compiled algorithm? Do you use this block to make the app run slower? Personally, I can’t give an example of the need to use the “wait” block in

Arrrh okay. I just saw the leader on your icon Ans assumed you where leader at Thunkable.  
No then it is not your problem.  
Thanks for your reply.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:25am UTC](https://community.thunkable.com/t/how-does-the-blocks-execute/656288/12 "2024-11-08T11:25:05Z")

</div>


