Is UIWebview JS Performance slower than mobile safari on iOS 6/7?

牧云@^-^@ 提交于 2019-12-04 09:35:03

问题


We have recently tested some HTML5 content with heavy javascript libraries from an iOS app. The app designed to load these contents in UIWebview. iOS 6 was used for this testing. My team did not observe any noticeable performance issues against mobile safari browser. But on the web and in other stackoverflow discussions (like this one - link) experts claim that UIWebview misses Nitro Javascript Engine so it is usually much slower than Mobile Safari Browser.

Is this no longer an issue with the latest versions of iOS (6/7 beta)?

Is there a way to benchmark and observe the performance difference between UIWebview and Mobile Safari Browser?


回答1:


Yes there is a way to benchmark the differences.

Start this benchmark in Safari first: http://www.webkit.org/perf/sunspider/sunspider.html

Then, build a simple app that contains an UIWebView and let it open the URL. Now start the App on your Tablet/Phone an run the test again in your UIWebView.

My results on iPad 2 iOS 6.1.3:

Safari Total: 1490.8ms

UIWebView Total: 5496.8ms


来源:https://stackoverflow.com/questions/17796149/is-uiwebview-js-performance-slower-than-mobile-safari-on-ios-6-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!