Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emulate a slow iPhone

I have an iPhone app (Objective C++). My beta testers - some of them, not all of them - are complaining of slow startup, 7 to 10 seconds. On my device (it's a 3GS), it loads in about 2 sec. On the device simulator - even faster. As things stand now, I cannot even isolate the bottleneck.

Can I somehow slow down the simulator or a fast device? Setting the simulated hardware version to 2.0 does not help.

As a last resort, I could try and borrow an old, slow device from a friend for a night or two. But I'd rather not...

like image 548
Seva Alekseyev Avatar asked Oct 26 '22 22:10

Seva Alekseyev


2 Answers

If I were you I'd try profiling the startup with Shark - it's hard to profile startup on the device, one way is to put a 5-6 second sleep statement in ApplicationDidFinishLaunching so you have time to attach Shark and start recording, don't make it too long though or the app will be killed!

Also consider what you are doing on startup that might be a lot longer for some people - looking at address records, or things like that.

like image 81
Kendall Helmstetter Gelner Avatar answered Nov 10 '22 18:11

Kendall Helmstetter Gelner


Aral Balkan links to some nice tools by Mike Shrag that allow you to get the old slow motion simulation mode on triple shift working in SDK 3. Speedlimit - which allows you to throttle network bandwidth might be useful.

like image 22
martin clayton Avatar answered Nov 10 '22 17:11

martin clayton