iOS 8 Action Extensions experience slow JS performance

Originator:abarinov
Number:rdar://18957979 Date Originated:11/12/2014
Status:Open Resolved:
Product:iOS SDK Product Version:8.1
Classification:Performance Reproducible:Always
 
Summary:
On an iOS 8 action extension the performance of WKWebView is throttled, especially when compared to the performance of the same exact code outside of the action extension.

Steps to Reproduce:
1. Download the attached package and open the ExtensionTest sample project.
2. Run the regular app and complete the Octane benchmark. Note the performance metrics.
3. Run the extension (featuring identical code, namely WKWebView) and complete the Octane benchmark. Note the performance metrics.
4. Compare the two sets of metrics.

Expected Results:
Since an action extension operates in a memory constrained environment, it is expected that it's performance will be somewhat throttled. We expected a single order of magnitude or better difference between the two sets of results.

Actual Results:
The measures for memory, garbage collection, and compiler latency show an extremely high two order of magnitude (100x) difference in performance. This performance profile is seen on the iPhone 6 Plus, which has the most performant hardware in the iPhone line. An action extension run on an iPhone 5S was not able to complete the Octane benchmark within a reasonable time frame.

Since most web applications typically make heavy use of JavaScript and it's garbage collector, these metrics indicate that their performance would be highly impaired when run inside of an action extension.

This is happens despite the use of WKWebView, which is makes use of all available JS runtime optimizations on iOS and use of the latest hardware. (iPhone 6 Plus)

Version:
iOS 8.1 (12B411)

Notes:
See the report (available in PDF and Pages formats) in the attached package indicating the exact performance numbers as well as device screenshots.

Configuration:
iPhone 6 Plus 16GB

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!