PhoneGap的应用程序性能VS本机应用程序的性能 [英] Phonegap app performance vs native app performance

查看:161
本文介绍了PhoneGap的应用程序性能VS本机应用程序的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在寻找在得到建酒吧code扫描应用程序。我们正在考虑使用PhoneGap的,但我们唯一担心的就是速度。 所有的应用程序会做的仅仅是扫描吧code和检查服务器,看它是否有效。该应用程序使用相机非常强烈,通过图像扫描吧code。 我的主要问题是,通过PhoneGap的将扫描一样快作为原生应用程序?速度是因为用户必须扫描多条codeS很快真的很重要。

we are looking at getting a barcode scanning application built. We are considering using PhoneGap but our only worry is speed. All the application will do is just scan a barcode and check a server to see if it's valid or not. The application uses the camera very intensely to scan the barcode via an image. My main question is, will scanning via phonegap be just as fast as a native app? Speed is really important as the user will have to scan multiple barcodes very quickly.

推荐答案

PhoneGap的使用相同的原生API,它只是抽象,从而使您可以编写HTML和JavaScript应用程序。拍摄照片或任何其他本机过程的时间比用户感知的时间不那么重要。这是你需要暴露给用户+抽象API时间+ UI响应本地执行时间的部分。

Phonegap uses the same native APIs, it just abstracts them so that you can write your application in html and javascript. The time to take a picture or any other native process is less important than the time the user perceives. This is the portion of the native execution time that you need to expose to the user + Abstraction API time + UI responsiveness.

总是有距离的抽象的开销,但我认为这是可以忽略不计在这样一个应用程序(在手机比BB OS5更新)。从硬件的当前问题起源渲染HTML和安装在设备上的浏览器软件

There is always an overhead from an abstraction but I think that's negligible in an app like this (in phones newer than BB OS5). The current issues originate from the hardware rendering the HTML and the browser software installed on the device.

有一个很大的黑莓手机不使用的WebKit(OS5及以下)和他们的使用似乎非常缓慢,同时呈现web应用的浏览器。 BB OS版本低于5不具备本地和JavaScript层之间沟通的生产堪路,这是经常看到的黑客是设置和民意调查的变化饼干。 Android已经一直有一个很好的设计,JavaScript的原生交互AFAIK。

A lot of BlackBerry phones don't use webkit (OS5 and below) and the the browsers they do use can seem very sluggish while rendering webapps. BB OS versions less than 5 don't have a production worthy way of communicating between the native and javascript layers, the hack that's often seen is to set and poll for changes in cookies. Android has always had a good design for JavaScript to native interaction afaik.

黑莓手机和许多低端的Andr​​oid手机没有GPU的,或者说确实有GPU的没有为GPU编译WebKit的一些Android手机!如果没有这个你的用户界面的应用程序可能 有呆滞的感觉,页/按钮采取一​​点的时间来作出反应,这是非常明显的,当你试图通过嗖嗖的菜单。

BlackBerry phones and many lower end Android phones don't have GPU's, or some Android phones that do have GPU's don't compile webkit for the GPU! Without this your UI app may have that sluggish feel, pages/buttons take that bit longer to respond which is very noticeable when you're trying to whiz through menus.

由于PhoneGap的发布这已经改善了很多。 UI滞后应继续减少到一个地步,甚至是新的低端手机是生产准备的webapps。但是从我的经验,我们还没有达到这一点在2011年。

This has improved a lot since phonegap was released. UI lag should continue to decrease to a point where even new low end phones are production ready for webapps. But from my experiences we've not yet reached that point in 2011.

这篇关于PhoneGap的应用程序性能VS本机应用程序的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆