Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS8 Webview performance still heavily slower than mobile Safari

I'm developing a PhoneGap HTML5 app, which is doing some image manipulation.

What I see is that the same script (http://fornace.io/jstests/gogh.html) is taking roughly 10x more time to execute inside Phonegap than in mobile Safari (from 5 seconds to about 45).

Since we all understood that iOS8 Webkit finally allowed all the apps to use the same Nitro engine as Safari, I wonder if someone can explain how this huge difference is still there, and if there's a workaround.

like image 855
Francesco Frapporti Avatar asked Oct 26 '14 14:10

Francesco Frapporti


1 Answers

There are two different webviews as of iOS8. The standard UIWebView and the new WKWebView.

WKWebView is the one that will improve everything, but as the Cordova devs have explained in detail here, there is a bug where WKWebView does not allow loading of local files and therefore cannot be implemented with Cordova right now.

This explains the issue you are seeing. Apparently Apple is aware of the issue and if it gets resolved I would expect it to be implemented in Cordova after that time.

like image 199
Dawson Loudon Avatar answered Oct 12 '22 23:10

Dawson Loudon