Ummm - My startup is not being called until 17 seconds in. I can't speed up 
what isn't my code.

And my startup takes 0.4 of a second, so I don't need to speed that up. I just 
need it called sooner than 17 seconds in.

From: Byron Sommardahl [mailto:[email protected]]
Sent: Wednesday, May 30, 2012 8:45
To: Dean Cleaver
Cc: Alan; HairyJohn; [email protected]
Subject: Re: [MonoTouch] Speeding up startup

I really liked what Alan said and would be interested if it works in your case. 
Say you have 17 things that have to run before the app "launches", each taking 
1 second to complete. Maybe for 10 of those things, it doesn't matter when they 
run/finish. So, execute those 10 things in a new task and forget about them. 
Then your start up should only take 7 seconds.

For example:

var task = Task.Factory.StartNew(() =>

            {

                //do your async work here

            });


On Wed, May 30, 2012 at 6:50 AM, Dean Cleaver 
<[email protected]<mailto:[email protected]>> 
wrote:
Hi,

My FinishedLaunching completes in about half a second. It's just taking 17 
seconds before that gets called.

Dino

-----Original Message-----
From: 
[email protected]<mailto:[email protected]> 
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Alan
Sent: Wednesday, May 30, 2012 4:11
To: HairyJohn
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [MonoTouch] Speeding up startup
Hi,

Have you tried moving all logic out of the 'FinishedLaunching'
override? You should not be doing expensive initialisation synchronously for 
precisely this reason - iOS will kill your app if it takes too long. For 
example wrap code in a Task which will execute on the background thread. You 
need to ensure you only touch the UI from your main thread though, 
http://docs.xamarin.com/ios/advanced_topics/threading .

Alan

On 30 May 2012 09:52, HairyJohn <[email protected]<mailto:[email protected]>> 
wrote:
> I have the same problem with my app on my old 3G iPhone that I use to
> test with iOS4. So would also be interested in any optimizations that
> we can make.
>
> Cheers
> Hairy
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Speeding-up-startup-tp4655096p4
> 655102.html Sent from the MonoTouch mailing list archive at
> Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]<mailto:[email protected]>
> http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]<mailto:[email protected]>
http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]<mailto:[email protected]>
http://lists.ximian.com/mailman/listinfo/monotouch

_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to