Do the Blocks make the app slower?

Hello koders
i have a qusteion Does the many Blocks make My app slower?

Yes definitely. Your blocks in the screenshot is blurry and unreadable, try to avoid using the default shortcut for screenshots when capturing blocks. Please right click an empty space in the Blocks editor, then choose Download Blocks as PNG.

  • Do you know that you can use “else if” statements? You are using too much “if then else” statements, you only need one of them, click on the blue cogwheel, and add “else if” statements.

  • Based on the pattern of your blocks, I don’t think you need so many statements, even if you use “else if”. There is too much repetition. Send your AIA here so that other people can teach you how to reduce repetition. Don’t Repeat Yourself.

2 Likes

OMG!! Se how much if then conditions you have used… nearly 20+ Do you think app will check all these conditions in no time?? Share us the conditions we will make you to short cut it if possible…

1 Like

Some years ago I made a code to solve a math game. Appinventor spended about 2 minutes to find all the possible solutions :joy::joy: There was a code like this :man_facepalming:t2:

i fix it with some variables but thank you.

1 Like

Thank you very much.

1 Like

Really?:joy::joy::joy:

Yes :joy::joy: the math game has a trick to solve it but if you want to try all the possible solutions to find the right one Appinventor need about 2 minutes :joy::joy: I tried also a different algorithm but I saved only 15 seconds

If possible share a full block properly. Right click on the event, download blocks as image nd upload it

Sorry i cant, i delete the bluck.

This is a lot of blocks but my apps has 8000 to 10000 blocks they or bit slower. not noticeable

1 Like