Why retrieves a native app data faster than one with PhoneGap?

I know that an app developed with PhoneGap is slower than a native one because at PhoneGap the whole code must be interpreted at runtime into a native one.

But could someone explain or has a good in-depth website which explains why a native app retrieves data (a picture or text) from a web ressource faster than an app with PhoneGap? Do both apps handle internet connections in another way, or is there more data retrieved by an PhoneGap app?

3

It’s a totally different application event process.

PhoneGap uses JavaScript event callbacks that are designed to be generic across multiple devices, whereas Android is activity based which is native to the OS. iOS has something simular but I can’t comment on that.

Android knows which activity to start when the application is loaded, and execution of that activity happens relatively quickly even for large applications. Whereas, PhoneGap requires a HTML5 browser to finish loading, then all the HTML5 JavaScript files have to load from the device and the JavaScript has to be executed at least once to initialize all the code. As a result there is a visible delay in starting PhoneGap applications. That’s why PhoneGap includes a splash screen feature while the app loads.

After a PhoneGap application has started the entire user interface is a rendered HTML page, which is subject to performance issues relative to the device it’s on. Whereas, native Android applications often use the OS to render their activity view. So improvements in the speed of the OS translate to faster apps. HTML rendered by a browser is limited to the speed of the processor and GPU.

Performance Should Be The Same When

  • Applications can take advantage of local storage, caching and SQL.
  • Communication with the web server is done via AJAX (JSON, XML or HTML).

Performance Should Be Different

  • Javascript is used to perform large calculations.
  • The user interface displays data from a large data source.
  • Read/Write operations to local storage are in large amounts (i.e. camera images)
  • All visual elements that involve animation or large graphics would be faster done natively.

Hybrid PhoneGab

There is no good reason for a PhoneGap developer to complain about performance. PhoneGap allows you to develop code for each device that runs natively, and can be executed via a plugin to PhoneGap. The native plugin is exposed to the PhoneGap app as a Javascript extension. Any time performance is an issue the developer has the option to move that code to a native plugin.

While JavaScript is slower than native code. What is it the code is doing that makes it so slow? Most likely it’s bad Javascript then a fault in the design of PhoneGap.

Why PhoneGab?

PhoneGab is not Android development. It’s HTML5 and personally the Android SDK can allow you to achieve results often faster than implementing the same thing in HTML. I think people who have strong skills in HTML/Javascript have very specific user interface expectations, and recoil at the idea of the OS imposing standards.

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật