Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap app performance vs native app performance

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.

like image 505
Avi Avatar asked Sep 22 '11 21:09

Avi


People also ask

Do native apps run faster than web apps?

Advantages of Native Apps:Native apps are faster than web apps. Native apps can access system/device resources such as a GPS or camera. These apps can work without an internet connection. These apps have more safety and security than web apps, as native apps must be approved by the App Store.

Is native faster than React Native?

This makes it easier for mobile app developers to easily create any type of application using Native technologies. In a nutshell, Native wins the React Native vs Native app performance battle.

Why are hybrid apps slower than native apps?

Hybrid applications don't perform as fast as native apps. Their architecture has an additional layer between the source code and the mobile platform, making them slower. Of course, as technology and mobile frameworks are progressing, the difference becomes negligible, especially if your application isn't complex.

Is PhoneGap native or hybrid?

There are many hybrid mobile frameworks, such as Ionic, NativeScript, React Native, Xamarin, PhoneGap, etc.


2 Answers

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.

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.

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.

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.

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.

like image 180
Ray Vahey Avatar answered Sep 29 '22 16:09

Ray Vahey


The phone's built-in software is what does the scanning and camera action. PhoneGap will only trigger the event and help transfer the data but the phone does all the work.

like image 24
Rob Avatar answered Sep 29 '22 16:09

Rob