android - native 应用程序比 HTML5 更快

标签 android ios html native

<分区>

我一直认为 HTML5 应用程序与 native 应用程序相比应该没有弱点,但根据今天发布的新 facebook 应用程序,当他们切换到 native iOS 代码而不是 Web 时,速度得到了提升应用程序。

That includes a faster opening of the app itself, smoother and faster scrolling, and photos that are said to load "instantly" -- changes that are largely due to a switch from the old HTML5 code to iOS' native programming language.

任何人都可以保证这些速度改进吗?原生开发有那么快吗?

iOS 版 Facebook 原生,告别 HTML 5 http://www.theverge.com/2012/8/23/3262782/facebook-for-ios-native-app

最佳答案

我在您发布的链接中找到了一个链接,该链接在页面上有一个部分说明它为什么更快

Under the hood: Rebuilding facebook for IOS

该部分名为(Re-)Building for speed

. One way we have achieved this is by re-balancing where we perform certain tasks. For example, in iOS, the main thread drives the UI and handles touch events, so the more work we do on the main thread, the slower the app feels. Instead, we take care to perform computationally expensive tasks in the background. This means all our networking activity, JSON parsing, NSManagedObject creation, and saving to disk never touches the main thread

关于android - native 应用程序比 HTML5 更快,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12098595/

相关文章:

javascript - 捕获按钮的值

html - 如何将 ':after' 伪元素放在其所有者的末尾?

android - 如何在YouTube视频结尾处做点什么

php - 从 Android 应用程序向 PHP 发送帖子

ios - 在 iOS 上的 Safari 中未检测到麦克风

ios - 核心数据实体未更新

html - 防止在可滚动的 flex 容器中收缩并垂直放置 flex 元素

android - Google Play商店政策是否允许获取电话号码

android - 如何让我的设备振动?

iphone - iOS7 中的 CLLocation 未更新