We see a significant performance increase when running the SunSpider benchmark suite on WKWebView. WKWebView now uses the Nitro JavaScript engine, which has JIT (just-in-time) execution functionality, and the benchmark app runs 4.5x faster than UIWebView. It is a serious performance increase that all hybrid app developers can take advantage of.

We also noticed a reduction in memory usage when testing under the Octane benchmark. Whereas UIWebView engines just crashed during benchmarking, WKWebView was able to display the final score. This will also make developers very happy.

A real-world example
We picked a Canvas-based benchmark to see how iOS 8 WebKit view improved overall performance.


You can definitely see a difference when running on WKWebView. It was much smoother with better performance. It appears that an average 20% performance increase is likely to happen for these types of JavaScript-based apps.

API changes: WKWebView has a completely different set of APIs than UIWebView. So, it’s just not a simple string replace that can make the replacement happen.

The most notable change is that WKWebView now has a mechanism to communicate between the native layer and the browser layer. Until now, it was technically possible but not very straightforward. For example, Cordova utilizes internal AJAX an IFRAME element to pass the data. WKWebView provides a direct way to send data between the layers. It will be much more accurate and take much less overhead compared to the UIWebView way of sending messages.