Card slow to open - solved

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
KimD
Posts: 223
Joined: Wed Jul 08, 2015 5:51 am
Location: Wellington, New Zealand

Card slow to open - solved

Post by KimD » Sat Dec 05, 2020 4:04 am

I normally post problems, but I thought that today I would share a learning. I had a card that was very slow to open on Android. I added extensive logging and found a 2600 milliseconds delay between:
- the end of the previous card's closeCard handler; and
- the start of the problem card's preOpenCard handler.

Interesting, on the windows IDE this delay was zero milliseconds.

After a lot of experimentation I worked out that the problem was the two images on the problem card had the Buffer property ticked. When I UNTICKED the buffer property the 2600 millisecond delay between closeCard and preOpenCard dropped to 1 millisecond on Android.

As a bonus - by removing ALL buffering on images and ALL my app's Send statements (which turned out to be my other major Android performance inhibitor) my apps startup time has gone from about 5 seconds down to something less than half a second.

Hopefully this helps someone else one day.

Post Reply

Return to “Android Deployment”