[Solved] Is there some reason why my blocks might start to lag?

so you are looking at lets say 7000-8000 blocks O.o

I guess that could be slightly understandable, but these calculations as such are not all at the same time. It doesn’t make sense. Is the app constantly changing variables in the background? what are the background tasks

The App was great till 2 days before yesterday (ipa , apk and live test all were good and fast).
Suddenly, APK took 5 seconds per button, screen navigating slowed, for loop was taking a single item in 1.5 sec/item…
Mysterious

1 Like

hmm, did you try making a copy of the project? Are there variables from other projects being carried over?

1 Like

NOTE My lag happens when in the blocks editor, NOT on the phone end.

I am lagging with 300-400 blocks on a screen (cant get more or it lags sooooo bad). It dosnt seem to matter the number of screens I have. Im running in Chrome and yes I have tried Firefox which had the same results. I run a mid range gaming pc with 16bg ram. It also dosnt seem to matter if Im live testing or not. If a staff member needs to access my project let me know as it is private. thanks

1 Like

Actually I would like to add that after further investigation with my Android app, there does appear to be button lag, but it really only shows when I am getting response issues with my api (I am doing a lot of if statements etc with the code that i receive, and if it is “dirty” and the app doesn’t have a clue what to do, then it becomes extremely slow. But this is more obvious when blocks try to do something that doesn’t really work, if you get me.

Maybe this is your issue? Does 1 button kick off a load of calculations and blocks?

1 Like

Mr. @Mark good morning. Any good news ? the apk application continues slower than in the companion (android) . thx.

1 Like

We’re still working on figuring out this problem.

-Mark

1 Like

Hi Mark,
Don’t know if this will help but I’ve discovered that if I turn off all connectivity (Wifi and Mobile Data) on either my phone or tablet, the installed app runs properly with no delays at all. When I turn Wifi or Mobile Data back on the slowdown returns.
Thanks again for all the work…
Peter

Yes, this is definitely useful information! We had started to think that the problem might have to do with internet connectivity or latency. The fact that your app doesn’t require connectivity makes this quite mysterious, though.

-Mark

1 Like

Sorry, I think you guys are wrong. my app uses connectivity and on the same network the same app is fast on iphone, fast on companion and slow on apk. for sure. @mark you have the link in my app, you can even test what I am saying.

2 Likes

Hello everybody,

@mark
@pgbowers
@kartik_old
@Steven
@joannietw

I am sharing this simple code to help identify the problem. I ask you to test it on the companion (android), the IOs (who have) and the android (apk installed) and then post the result. In my case in the companion android and in the IOs the time was less than 0.89000 … Seconds, the APK installed in the Android 8.6783868 Seconds.

Please test and post. I Hope this helps.

App Link: https://x.thunkable.com/copy/aee12ef1c44189174dca89f2037d011c

PS. A friend of mine installed and apk could not finish, he froze. I do not know the android version of it.

@Extremus_Data_Protec, Our suspicion is that something unexpected is trying to connect over the internet, but only for built APKs! You could help us test this theory by going into airplane mode (i.e. turning off wifi and cell data) as @pgbowers did, and running your installed APK again and seeing if you have a similar lag or not.

Thanks in advance.

-Mark

2 Likes

@Mark

I just tested in airplane mode and the results have remained the same with a minimum variation. being:

Android companion: 0.9283789000 Secs
IOs installed: 0.8478342
Android APK: 9.423422 Secs

It made no difference to put the phone in plane mode. The application I’m using and shared for everyone to test has exactly 82 blocks only.

Install and test. 82 blocks only.
App Link: https://x.thunkable.com/copy/aee12ef1c44189174dca89f2037d011c

@Mark

I just tested in airplane mode and the results have remained the same with a minimum variation. being:

Android companion: 0.9283789000 Secs
IOs installed: 0.8478342
Android APK: 9.423422 Secs

It made no difference to put the phone in plane mode. The application I’m using and shared for everyone to test has exactly 82 blocks only.

Install and test, 82 blocks only.
App Link: https://x.thunkable.com/copy/aee12ef1c44189174dca89f2037d011c

1 Like

Many thanks to Extremus_Data_Protec for the test code, it confirms what I reported from my app last week:
My results this morning:
1: Live Test completes in 0.720 seconds
2: The installed APK with Airplane Mode on(no connectivity) completes in 1.2 to 1.5 seconds
3: The installed APK with Airplane Mode off (wifi and data connected) completes in 25.8 to 26.3 seconds.
There is definitely something going on in the background when the phone is connected to the Internet!

1 Like

Could other folks please test Ygor’s app in live test mode and via an installed APK with Airplane mode on and Airplane mode off and report their results?

-Mark

1 Like

FYI, we believe that we have identified the problem and have a fix ready to go. It should go to production sometime today. At that point you’ll need to re-download your APKs.

-Mark

3 Likes

The fix for the slow APKs should be live now. Please reload your browser page and re-download your apks.

-Mark

5 Likes

I Mark you as solved! :white_check_mark:

Thank u so much guys, u hardwork’d for many days :blush:

2 Likes

Hi Mark,
Yes, the fix works perfectly for me, MANY THANKS! I notice that the apk size is slightly larger than before (19.2MB vs 18.3MB) but that is not a concern.
I really like working with Thunkable and I am very impressed with the way the Admins listen to the community and take swift action when these growing pains happen, I’ll be signing up for the Pro membership today.

4 Likes