Why is my project lagging so much?

OK, so I've got a canvas with some sprites on it constantly switching costumes (associated blocks uploaded below) and it is lagging like crazy. I've read some other online forums and have somewhat self-diagnosed this to be caused by App Inventor not being great at switching costumes rapidly, but this answer seems wrong/doesn't exactly satisfy me.

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

Manage you timer event well first.

How many images are you working with, what size are they ?

Here is a simple example, switching 6 images every 100ms

costumeChange.aia (45.2 KB)

if you remove the code I have shown in the previous screenshot, it works/runs smoothly.

working with 23 images, switching every 80 ms at first but tried 160 now.

Why are you using such a fast time interval; consider the duration of an eye blink is on average between 100 and 400 ms . :wink: You might try 300 ms and eliminate your lag. :grinning:

Sample run 2
It looks okay on my emulator.

I fixed it... I was playing it on a lower power mode deviec

*device

12 FPS is considered the lowest FPS for our eyes to see an image tho so I figuered I'd divide and that's 83.33... ms so I jst did that lol

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.