Performance issues

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…

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.

1 Like

Why are you needing to check 90 values in Firebase?

1 Like

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
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
(sorry for bad spelling) :smiley:

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…

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.

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

For example this post: 🎮 WDC #26 Can you make your own "Wordle" game in Thunkable? - #42 by muneer

2 Likes

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 :smiley: (and for free)

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

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

2 Likes