UIApplication's canOpenURL: Slow on device with SIM

Originator:justin
Number:rdar://15020847 Date Originated:9/18/2013
Status:Open Resolved:
Product:iOS SDK Product Version:7.0
Classification:Bug Reproducible:Always
 
Summary:
Beginning in iOS 7, canOpenURL: takes 10-20x as long to execute than in all previous iOS versions.  Interestingly, it appears to only slow down on devices with a SIM.  This is detrimental to my app (Launch Center Pro) which provides the user with URL scheme actions usable on their system.  Scanning our list of ~1700 known URL schemes previously took ~1-2 seconds on an iPhone 5.  It now takes ~20+ seconds.  On an iPad or iPod Touch, it remains fast.

Steps to Reproduce:
1) Launch Xcode 5

2) Set up some basic time logging or watch instruments

3) Make call(s) to canOpenURL like so:
[[UIApplication sharedApplication] canOpenURL:url];

4) Observe time variation on different devices, include those with and without a SIM.

Expected Results:
We expect performance on par with previous iOS versions, or iOS 7 on devices without a SIM.

Actual Results:
On devices with a SIM, the processing time is 10-20x longer than those without, or on all devices in iOS 6.x and earlier.

Additionally, memory allocations within the related private framework seem to grow on problem-devices.

Version:
iOS 7.0 GM (And previous betas)

Notes:
The attached test project iterates through a large sample array of URL schemes.  Total elapsed time is measured.  In my testing, when run on an iPad Mini with iOS 7 GM, it completes in ~2 seconds.  Running on an iPhone 5 with iOS 7 GM, it completes in ~22 seconds.  (And almost instantly (0.2 seconds) in the Simulator.)

Configuration:
Through our testing and testing of others, the problem appears on devices running iOS 7.0 (all betas and GM) which also have a SIM installed.  

Some users report that removing the SIM and resetting all settings (in Settings.app) causes the problem to go away.  Re-inserting the SIM causes the problem to return.  (I've not independently confirmed this.)

Attachments:
'CanOpenUrlTest.zip' was successfully uploaded.

Comments

Original:

FYI, mine came back duped as: rdar://14879443

Duped as rdar://15033783

We're also heavily affected in our Where To? app where we test the URL schemes of 30+ different navigation apps.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!