Go to card slow

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Go to card slow

Post by bsouthuk » Mon Mar 23, 2015 3:46 pm

Hi

I have developed an APP that I am now deploying to Android using 7.0.3.

I have a stack containing multiple cards that a user can flick through using the standard 'go to next/previous card' script. The issue I have is that when there are a couple of images on a card, it take up to 10 seconds for that particular card to appear. The images are only small.

Is there something I can do to speed this process up? I do not have any other script within the stack or cards whatsoever. The only script is the 'go to next/previous card' script contained within the buttons on each card.

Help with this would be most appreciated.

Many thanks

Daniel

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Go to card slow

Post by jacque » Mon Mar 23, 2015 4:44 pm

Are the images imported or referenced? How big are they on disk?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Re: Go to card slow

Post by bsouthuk » Mon Mar 23, 2015 5:02 pm

Hi

They are imported and the image on each individual card is 170KB.

Many thanks
Daniel

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Go to card slow

Post by jacque » Mon Mar 23, 2015 8:53 pm

Images aren't the problem then, those are pretty small. If it is really the case that you have only one line of script in each button then I can't think of what might be wrong. I was getting similar long response times in an Android app but it was trying to connect (incorrectly) to an online database. The delay you see sounds similar, but it doesn't sound like you're connecting to anything online.

Just in case, check the filename of the image(s) in the property inspector. It should be empty if they are imported.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Go to card slow

Post by Simon » Tue Mar 24, 2015 2:03 am

...user can flick through using the standard 'go to next/previous card' script.
Are you using a "swipe" (flick) motion or a button?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Re: Go to card slow

Post by bsouthuk » Tue Mar 24, 2015 9:45 am

Hi, I'm using buttons.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Go to card slow

Post by Simon » Tue Mar 24, 2015 5:36 pm

Hi bsouthuk,
Post your stack I can test it here.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

Re: Go to card slow

Post by rinzwind » Thu Oct 08, 2015 11:32 am

go to card x is slow the first time it is called on mobile... slow as in 2 seconds delay. Frequent revisits whether or not the contents of it are changed through db are fast. There is nothing special about it. Tested it with some console debug commands....

While typing this post I got into some investigation... turns out that setting the font of a field to something else (like Tahoma) causes the delay... font loading? Its just as slow on ipad 2 simulator as on a real ipad air 2.

Also turns out that you can move this delay to the first app start by placing an invisible label thats using the font you use on the other card.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Go to card slow

Post by Simon » Fri Oct 09, 2015 8:17 am

Hi rinzwind,
Isn't it illegal to include Tahoma as a font for iOS unless you own/purchase the license?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

Re: Go to card slow

Post by rinzwind » Sun Oct 11, 2015 9:15 am

it's included in iOS apparently, since I don't have to include anything. But just using it as an example.
https://support.apple.com/en-us/HT202771
hmm it says download... what does that mean? happens automagically?

Adrien
Posts: 26
Joined: Fri Jan 09, 2015 9:55 am

Re: Go to card slow

Post by Adrien » Wed Oct 28, 2015 12:16 pm

Check if the resizeQuality of the images are set to "good" or "normal"
It's ultra slow when set to "best"

Post Reply

Return to “Android Deployment”