iphone threading speed up startup of app

Posted by BahaiResearch.com on Stack Overflow See other posts from Stack Overflow or by BahaiResearch.com
Published on 2010-03-28T14:35:03Z Indexed on 2010/03/28 14:43 UTC
Read the original article Hit count: 207

Filed under:
|
|
|

I have an app that must get data from the Sqlite database in order to display the first element to the User.

I have created a domain object which wraps the DB access and is a thread safe singleton.

Is this following strategy optimal to ensure the fastest load given the iPhone's file access and memory management capabilities in threaded apps:

1) In the AppDelegate's FinishedLaunching event the very first thing I do is create the domain singleton within a new thread. This will cause the domain object to go to Sqlite and get the data it needs without locking the UI thread.

2) I then call the standard Window methods to add the View and MakeKeyAndVisible etc.

Is there an earlier stage in the AppDelegate where I should fire off the thread that creates the Domain Object and accesses Sqlite?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about thread