7上的移动Safari更慢吗

7上的移动Safari更慢吗

本文介绍了UIWebview JS性能比iOS 6/7上的移动Safari更慢吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近使用iOS应用程序中的大量JavaScript库测试了一些HTML5内容。该应用程序旨在在UIWebview中加载这些内容。 iOS 6用于此测试。我的团队没有发现任何针对移动Safari浏览器的明显性能问题。但是在网络和其他stackoverflow讨论中(例如)专家声称UIWebview错过了Nitro Javascript引擎,所以它通常比Mobile Safari Browser慢得多。

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.

这是不是最新版iOS(6/7 beta)的问题?

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

有没有办法对UIWebview和Mobile Safari Browser之间的性能差异进行基准测试和分析?

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

推荐答案

是的,有一种方法来衡量差异。

Yes there is a way to benchmark the differences.

首先在Safari中启动此基准测试:

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

然后,构建一个包含UIWebView的简单应用程序并让它打开URL。现在在平板电脑/手机上启动应用程序,再次在UIWebView中运行测试。

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.

我在iPad上的结果2 iOS 6.1.3:

My results on iPad 2 iOS 6.1.3:

Safari Total: 1490.8ms

UIWebView Total: 5496.8ms

这篇关于UIWebview JS性能比iOS 6/7上的移动Safari更慢吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 09:34