Like any other performance issue: use Shark and / or tools to identify bottlenecks in your code, and then focus on how you can speed things up there. Each tool will give you an idea of how much time has been spent on which parts of your code, so the general scheme would be to run the tool at application startup time and then break data to see where performance is occurring.
At the time of launching the application, the most likely candidates for improvement will postpone data loading until it is needed, it is described differently as “on demand” or “lazy” loading. In fact, do not load data at application startup unless you really need it right away when the application loads. In practice, many things that may be needed at some point should not be immediately available when the application starts. For example, if you have a database of N records, but only one of them is visible at a time, do not load all N into memory at application startup. Download any current record, and then load the rest when you need them.
Tom harrington
source share