Minimizing load times
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Minimizing load times
My app is a single card, and takes approximately 15 seconds to load, meaning there is a black screen for about 15 seconds until it finally pops up. Is there a way to shorten the loading time, and/or to determine what is causing the delay?
Re: Minimizing load times
Would need to know a lot more than you are telling us... Is this for mobile ?... Does it take 15 seconds in the simulator or on a device?... What is in your openStack and/or your openCard handler ?...
Re: Minimizing load times
This is for mobile. It takes 15 seconds on an 800Mhz ARM6 device, and about 10 seconds on an 1Ghz ARM7. Never run it in a simulator.
No open stack handler, only a pre open card handler that dynamically generates the graphic objects and layout of image and label objects.
No open stack handler, only a pre open card handler that dynamically generates the graphic objects and layout of image and label objects.
Code: Select all
on preOpenCard
put 0 into MinX
put 0 into MinY
put item 3 of the screenRect into MaxX
put item 4 of the screenRect into MaxY
call createLayout
pass preOpenCard
end preOpenCard
command createLayout
lock screen
( 600 lines of setting widths, heights, lefts, tops, rounding calculations, 10x graphic resizes, setting object styles, ~40 label creations, ~70 graphic line draws)
unlock screen
end createLayout
Re: Minimizing load times
Start removing objects from the stack.and/or to determine what is causing the delay?
I found that a field with many lines of text does slow the opening of a stack in the sim and on device.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Minimizing load times
I only have a single multiline label. the rest are single line, one or two words.
Re: Minimizing load times
fyi, all those lines are antialiased. also, what is the calculation difference between resize quality good vs best?
Re: Minimizing load times
Instead of using a 'preOpenCard' handler, try using 'openCard' ... and instead of the call command, you might try
Code: Select all
send "createLayout" to this card in 100 millisecs
Re: Minimizing load times
Excellent. For some reason, using send vs call shaved 2 seconds off the load time on the ARM7 device.