# Performance issues

**URL:** <https://community.thunkable.com/t/performance-issues/2462264>\
**Category:** Issues / Bugs\
**Created:** [June 12, 2023, 11:05am UTC](https://community.thunkable.com/t/performance-issues/2462264 "2023-06-12T11:05:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)\
**Post date:** [June 12, 2023, 11:05am UTC](https://community.thunkable.com/t/performance-issues/2462264/1 "2023-06-12T11:05:10Z")

</div>

Dear all, i do not think it is a bug - nevertheless its an issue - Maybe caused by me - But perhaps there might be something that can be done in the background. Here goes:

At the end of a game, i am using around 90 requests to the Firebase DB asking if a record is correct or not. Each record has a “Get Request” to the firebase DB and it works - But it takes a lot of time.

Before sending each record i do prepare the sending; i collect a number of letters - Join them and then i come to the above check.

Now, i need to do the checks so i cannot “take out” any of these.  
But how can i improve the time spent. Is there any one that have run into the same issue…?  
Thanks  
Stefan…

---

<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:** [June 12, 2023, 1:22pm UTC](https://community.thunkable.com/t/performance-issues/2462264/2 "2023-06-12T13:22:07Z")

</div>

Hello @stefansladdeneng1!  
We do not recommend making so many requests to Firebase because it will make you also reach the Firebase plan limits.  
I understand that you would like to handle many data.  
Have you tried to use an object instead of individual requests?  
I would be happy to help if I have more information about what you are trying to achieve.

---

<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:** [June 12, 2023, 2:43pm UTC](https://community.thunkable.com/t/performance-issues/2462264/3 "2023-06-12T14:43:19Z")

</div>

Why are you needing to check 90 values in Firebase?

---

<div class="post-metadata">

**Author:** ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)\
**Post date:** [June 12, 2023, 3:50pm UTC](https://community.thunkable.com/t/performance-issues/2462264/4 "2023-06-12T15:50:31Z")

</div>

OK this is a reply to both of you @tatiang and @ioannis.

The users create words of 2-5 letters  
So i make a request for Lets say number letter in  
position 1-2 - Is that a correct word?  
position 2-3 - Is that a correct word?  
position 3-4 - Is that a correct word?  
position 4-5 - Is that a correct word?  
position 1-2-3 - Is that a correct word?  
position 2-3-4 - Is that a correct word?  
etc  
I fully realise that this is to heavy in all ways. Having said that - Ley me now rephrase a bit on what i would like in the best of worlds  
A word may consist of 5 letters  
Some time on space is blocket because a random process in the game  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/8/88cdf023aa4ad37a835980e4cfd60d79c37d99a1.png)  
In the above example -  
First row consists of 5 black boxes and the users add a word that they may think is correct acc to a dictionary  
Second row there is a rendom red box. In this box it is impossible to write. The red box is in the middle but CAN be in any of the horisontal position on that line. That mean user can write;  
2 + 2 letters  
1 + 3 letters (yes there are words of one letter)  
3 + 1 letters  
4 + 0 letter  
0 + 4 letter  
Here is an example where i added some letters  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/0/70704ac2b879378f1801a35e5dc282d5e5edf8d9.png)  
(sorry for bad spelling) 😃

Now - for the first line i have to make two operations

1. configure or join all 5 letters into an expression
2. Send it for a check with Firebase DB (I have around 10 000 words with 5 letters or less uploaded)  
For the second line it gets more complicated as there are so many configurations needed… Thats why i built the prototype as i did - In which i check ALL combinations possible…

So a formula where i can make a check for exactly what is needed - in this case  
Combining position 1-2 - and check  
Combining position 4-5 - and check

Now that you got something better to understand from i wonder - Do you have any ideas?  
And - Should i replace Firebase with something else? The FB Realtime DB works quite well i think…  
And it is very quick when calling for one or just a couple of checks…

OK folks - Does anything of this make sense…

---

<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:** [June 12, 2023, 4:39pm UTC](https://community.thunkable.com/t/performance-issues/2462264/5 "2023-06-12T16:39:46Z")

</div>

You’re clearly pretty deep into this and may not want to switch gears but… a couple thoughts:

1. You can use a variable to hold a long text string that contains a list of words separated by a delimiting character such as “,”. There are dictionaries online with word counts of 10,000 all the way up to 100,000 or more. You can then use the “does contain” text block to determine if the user’s word is in the text string. By including the delimiting character in the search, you avoid situations where the user has entered “her” as a word but it matches with “weather”. If you search for “,her,” then that won’t happen. I don’t remember the limit to the length of text strings in Thunkable but it’s large.

2. You can make a call to a dictionary API to see if the word is valid.

---

<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:** [June 12, 2023, 4:43pm UTC](https://community.thunkable.com/t/performance-issues/2462264/6 "2023-06-12T16:43:28Z")

</div>

It’s very possible several of the people who worked on this challenge already solved this problem:

> [@video\_game WDC #26 Can you make your own "Wordle" game in Thunkable?](https://community.thunkable.com/t/wdc-26-can-you-make-your-own-wordle-game-in-thunkable/1679973):
>
> It’s the daily word game that has taken the internet by storm, and this week your challenge is to recreate the viral sensation that is [Wordle](https://www.powerlanguage.co.uk/wordle/). A number of folks in the Community are already playing so if you want to share your score then head over [here](https://community.thunkable.com/t/wordle-no-spoilers/1694507). Our very own @jared has been sharing progress updates over on Twitter: The Challenge Users get 6 attempts to guess a 5 letter word. Letters that are in the word, but in the wrong place are coloured in yellow, Letters in the wor…

For example this post: [🎮 WDC #26 Can you make your own "Wordle" game in Thunkable? - #42 by muneer](https://community.thunkable.com/t/wdc-26-can-you-make-your-own-wordle-game-in-thunkable/1679973/42)

---

<div class="post-metadata">

**Author:** ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)\
**Post date:** [June 12, 2023, 4:45pm UTC](https://community.thunkable.com/t/performance-issues/2462264/7 "2023-06-12T16:45:49Z")

</div>

Hi and thanks - Let me see if i understand you correctly. If i take all 10000 words i have - and import them into a stored thunkable text string with a delimeter - i could the make the check against that.  
Is that correctly understood? If so sound interesting…

When it comes to api’s - i haven found any one in swedish 😃 (and for free)

---

<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:** [June 12, 2023, 4:47pm UTC](https://community.thunkable.com/t/performance-issues/2462264/8 "2023-06-12T16:47:36Z")

</div>

Yes, that is correct. See the links I posted just above.

---

<div class="post-metadata">

**Author:** ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)\
**Post date:** [June 12, 2023, 4:52pm UTC](https://community.thunkable.com/t/performance-issues/2462264/9 "2023-06-12T16:52:07Z")

</div>

Hmmm OK - Perhaps that is a better strategy after all…  
Even though i have to Shuffle around the code a bit… 😃  
Just read it - Amazing… Thanks for now…

---

<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, 1:33pm UTC](https://community.thunkable.com/t/performance-issues/2462264/10 "2024-11-08T13:33:48Z")

</div>


