Count and conditionnal visibility

Hello everyone!

I have developed an application and I have a problem because the application becomes slower and slower. I would like to know if there is a solution to remedy this problem.

I have two databases, one composed of challenges that users can choose to accept and the other composed of users. I have built a User x Challenge database that records when a player accepts a challenge.

At the beginning of the application there was no problem. But as the User X Challenge database grows, the application is slower.

I have a button which is only visible if adalo doesn’t find items with the same user and the same challenge (I use conditional visibility and count function with 2 filters) - see picture. The more the base will grow, the longer this count will be ! So I wonder if there is a trick to make the calculation faster or if I did something wrong ? My join base, User x Defi, is not so big 1500 lines. Which makes me think I’ve missed something somewhere.
Moreover when I use the web app version, the response time is much lower (1 sec vs 10 sec)

If you want to see for yourself how long the response time is, the app is available on Apple and Android and it’s called TEAO.

Has anyone encountered this kind of problem? If so, is there a solution?

Thanks a thousand times in advance for your help !!!
Réginald for TEAO

Can I ask, are you using many to many relationships?

I’m using one to many relationship, each User X Challenge line is only associated with one user and one challenge

Hello @crmorris2,

what do you think ? are my database well designed ?
If you are or you know an expert, I’m ready to pay to solve that problem.

best regards,
Reginald

Hi Reginald,

Many to many relationships will always slow an app down as they grow as it takes more processing power to process the requests. I touched on using join tables here so please take a look and see if you understand what they are and get back to me if you have any queries.

You can also speak to an expert here if you decide you wish to pay for an experts help.

Good luck

Cheers
Craig

hello Craig,

I’m already using Join Tables like this. The app was running normally but as the join table grows (number of lines), the app is getting slower. I found no solutions sadly

Best regards
Reginald