Performance challenges

I am struggling with Thunkable performance.
I have an app which has “disabled” buttons which I want to give an error beep when they are pressed.

Running my app in “Live Test” on Android
When I press the button there is a noticeable delay for it to “release”(looks like half a second) and then the sound plays, after the button has released!!


this app has 1451 blocks(I can’t believe there are so many!!) but it is not doing anything while pressing the button.

I created a simple dedicated test app to do some diagnostics


This is it for the test app.Thunkable

Running a dedicated test app in “Live Test” on Android
When I press the button there is still a noticeable delay in the button rising and the sound playing but it is just about acceptable.

Running the dedicated test app in “Live Test” as a web app
When I press the button the response is immediate.

Is there a “Release mode” to compile in?

I guess You are facing some device problem as I tested the app and it worked.

Bonus : For more effective “Error beep”, (I tested it and it felt extremely professional),
you can Add A dfrg Block like this :

image

Thanks. This is really interesting, I added the vibrate and it happens almost immediately but the sound is still noticeably delayed. I checked the sound file just to make sure there was no silent lead in and there is none. So the vibrate is a good addition but the sound is still delayed. I am running a Galaxy S10+.

Anyone else got any ideas?

2 Likes

Are you loading the sound source somewhere before you tell it to play?

I guess, because of the positions of the blocks, the vibration happens before the “error beep” So, try putting the vibrate block like this:

                 Call error play
                  then do  vibrate. ?

@catsarisky Yes, originally I was specifying the sound file at the start of the block but when I experienced the delays I moved it to the config in the design block so there should be no delay there.

@anush_bh20910 Thanks. I have just tried that but no change, the vibrate still starts immediately and the sound follows noticeably later.

2 Likes

This is expected. The sound block works asynchronously which means it will process your request but will not halt the app, it will allow it to continue processing next block. The loading of the file takes this time so the vibrate executes before you can year the sound.

Try changing the file to something simple like windows short sound file and compare the results.

@muneer Thanks. that was a good idea. The sound file I had was 17Kb, not large but I managed to find one of 2Kb. Unfortunately, no change. The beep still comes significantly after the vibrate.

I may have to just go with the vibrate as an error warning. Very frustrating

I have kind of found a solution, not perfect but it it better than is was. I have changed the button to trigger on “PressDown” rather than “Click” as this seems to to trigger the event sooner and give the impression of being more responsive. The sound is still delayed but it is less noticeable as it is fired sooner.

Thanks to all.

4 Likes

I’m having simillar issues making music education apps.
Sound component just seems to feel sluggish. Is this a limitation of Thunkable or is there a workaround here?

2 Likes

Using “Touch Down” instead of click definitely helps a lot.

1 Like

I used the web version and made the control from JavaScript only. But it looks different and not part of Thunkable.

In the other hand, the sound (music) works even when the screen is off which my client wants.