views:

542

answers:

4

Hi all, I've been working on a new app, and when I run it on the simulator, it's VERY slow. There's nothing fancy in the app, just UINavigationControllers and text. The slowness only occurs if I launch the app from Xcode (with or without debugging on, doesn't matter). If I run the app on my iPhone or launch it directly from the simulator by clicking it's icon from SpringBoard, the performance problems all disappear.

For what it's worth, all my other apps perform just fine when run launched from Xcode in the simulator, so it must be something specific to this app. Has anyone experienced this before?

UPDATE: There is no performance hit when the app is run through Instruments either. I'm not using any 3rd party libraries. It's all calls to the Apple SDK.

Thanks, Arash

+2  A: 

Have you looked at it in Instruments to see where it's spending its time? No reason to guess when you can test.

NSResponder
A: 

There's something wrong with your Xcode and its process to launch the app in the iPhone Simulator.

Jesse Armand
A: 

Running an app in the simulator while in active debugging will always make the app slower. Always, and in a way that is exactly what you are describing.

Basically, "Build and Go" will be slow because its running the debugger.

This is different from "Debug" vs. "Release". The debug build will run fast if you aren't actually debugging it.

Jasconius
A: 

Are you using NSLog() to print a large amount of information? When you launch through Xcode, that information is piped to the debugging console and, if there's a lot, will take time to update the window. When you launch directly or on the device, the data is simply stored in a file, which generates less overhead.

I once reduced a program's run time from several minutes to a few seconds simply by removing logging statements. Unfortunately, it was for a timed programming contest.

benzado