Reputation: 32061
I don't have any hardcore data supporting this, but generally, you'll notice that any app you play with or one you're working on, when the app first loads, doing something such as displaying a modal view controller is slow the first time, but every subsequent time, it's really fast. For my app, when I present a modal view controller the first time, it takes about 3 seconds, but if I do it over and over again after that, it takes less than a second every time. What is the reason for this?
Upvotes: 0
Views: 96
Reputation: 44876
There's a bunch of possible explanations here.
Upvotes: 2
Reputation: 12190
No, I don't notice this in my app. The cause of what you are seeing could be a hundred different things, so we need a bit more data to make an informed answer.
Suggest you run Instruments, narrow down the time window to the initial 3-second pause, then see what the machine is doing during that time. Run it multiple times and look at CPU, IO, memory, anything that could be slowing it down.
Upvotes: 2
Reputation: 73936
Caching. Off the top of my head, images are often cached, and I wouldn't be surprised if the nib was cached as well.
Upvotes: 2