How to Improve App Launch Time
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to Improve App Launch Time
On my iPhone 4, when my iOS app launches for the first time after a reboot, it takes about 14 seconds on the Launch Screen until it reaches the main home screen.
Reopening the app after the first initial launch will take about 4 seconds for this process to occur (much better!).
Is there a way to speed up this first launch process so it doesn't take 14 seconds?
This is all I have in my stack script:
on resizeStack pNewWidth, pNewHeigh
put pNewWidth & pNewHeigh
into tResize
-- Resize/Move card controls here when stack is resized
switch tResize
case "320480" -- iPhone Vertical
break
case "640960" -- Retina Vertical
break
default
end switch
end resizeStack
Reopening the app after the first initial launch will take about 4 seconds for this process to occur (much better!).
Is there a way to speed up this first launch process so it doesn't take 14 seconds?
This is all I have in my stack script:
on resizeStack pNewWidth, pNewHeigh
put pNewWidth & pNewHeigh
into tResize
-- Resize/Move card controls here when stack is resized
switch tResize
case "320480" -- iPhone Vertical
break
case "640960" -- Retina Vertical
break
default
end switch
end resizeStack
Re: How to Improve App Launch Time
What is in the script of the first card? 

Re: How to Improve App Launch Time
Thanks so much for responding!
My bad...totally forgot to add that:
on openStack -- it's still invisible
if the environment is "mobile"
then
if item 1 of iphoneDeviceResolution() = "320" then go to stack "iPhone 3G"
else
go to stack "iPhone 4"
end if
go to card "Home"
end if
end openStack
My bad...totally forgot to add that:
on openStack -- it's still invisible
if the environment is "mobile"
then
if item 1 of iphoneDeviceResolution() = "320" then go to stack "iPhone 3G"
else
go to stack "iPhone 4"
end if
go to card "Home"
end if
end openStack
Re: How to Improve App Launch Time
Hi Tester2,
hm, does not look very spectacular!?
In what stack is card "Home"?
If it is in the stack that you are going to, you could try:
and see if that helps.
Sorry, no idea so far!
Best
Klaus
hm, does not look very spectacular!?
In what stack is card "Home"?
If it is in the stack that you are going to, you could try:
Code: Select all
...
if...
go cd "Home" of stack "iPhone 3"
else
go cd "Home" of stack "iPhone 4"
end if
...
Sorry, no idea so far!
Best
Klaus
Re: How to Improve App Launch Time
Hey Klaus,
Yes. The Home card is in each of the stacks I am navigating to. I tried adding the code you gave me, but it didn't save much more than a few tenths of a second.
I don't know of any other way to make it faster, besides chopping out one of my stacks so it doesn't have to switch between them.
Are there any processes that run on startup, kind of in the background, that can be removed or modified - that might be taking time?
Thanks.
-Tester2
Yes. The Home card is in each of the stacks I am navigating to. I tried adding the code you gave me, but it didn't save much more than a few tenths of a second.
I don't know of any other way to make it faster, besides chopping out one of my stacks so it doesn't have to switch between them.
Are there any processes that run on startup, kind of in the background, that can be removed or modified - that might be taking time?
Thanks.
-Tester2
Re: How to Improve App Launch Time
If you have a lot of objects on the first card of a stack, that can take away time to calculate the rendering, experimenting with making them invisible or grouping the objects can help with that. Don't show a browser or a movie on startup either.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: How to Improve App Launch Time
Thanks BvG..I will try that.
Do you know, does LiveCode only render/load one card at a time, or all of them at startup?
Thanks bunches!
-Tester2
Do you know, does LiveCode only render/load one card at a time, or all of them at startup?
Thanks bunches!
-Tester2
Re: How to Improve App Launch Time
Do you keep any data (especially binary data, or code) in a (possibly hidden) field?
If so, even though it is hidden, there will be a lot of overhead on the "invisible" rendering in the field.
It is much more efficient not to use fields for hidden data, and put such things into custom properties.
Just in case that helps.
If so, even though it is hidden, there will be a lot of overhead on the "invisible" rendering in the field.
It is much more efficient not to use fields for hidden data, and put such things into custom properties.
Just in case that helps.
Re: How to Improve App Launch Time
This is a shot in the dark, but "home" is a reserved word in LiveCode. Even though you are referencing it correctly and it shouldn't cause any problems, the engine may be misinterpreting that name. What happens if you rename those cards to something else?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com