NSURLSession is extremely slow on watchOS
Originator: | johnrhickey | ||
Number: | rdar://22084261 | Date Originated: | 30-Jul-2015 8:14 PM |
Status: | Open | Resolved: | |
Product: | watchOS | Product Version: | 2.0 beta 4 (13S5305d) |
Classification: | watchOS SDK | Reproducible: | Yes |
Summary: watchOS 2 NSURLSession requests are 10x-50x slower than iOS. I have an app that makes local network requests. With both the iPhone app and WatchKit 1 app extension these requests were very quick, completing the NSURLSession dataTaskWithRequest:completionHandler: block in under a half a second. On watchOS 2, it's between 10x-50x slower when fetching JSON. Steps to Reproduce: 1. Open attached sample project "FooProject" 2. Build and run iOS target 3. Press the button to make network request 4. Note the times displayed on screen and in the console 5. Build and run watchOS target 6. Press the button to make network request 7. Note the times displayed on screen and in the console Expected Results: NSURLSession network calls on watchOS can be slower than on iOS, but should not 10x-50x slower when fetching JSON. Actual Results: watchOS NSURLSession is extremely slow compared to iOS, in both the simulator and actual device. Actual iOS device, 3 separate runs: Request time: 0.052136 seconds Request time: 0.321204 seconds Request time: 0.044031 seconds Actual watchOS watch (exact same code, exact same request): Request time: 3.554821 seconds Request time: 2.775169 seconds Request time: 2.781989 seconds Version: WatchOS 2.0 (13S5305d) Notes: Configuration: Attachments: 'FooProject.zip' was successfully uploaded.
Comments
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!