Reputation: 127
I am experimenting with android native apps using HTML5 and jQuery Mobile. I have so far got XDK 1494, but I wanted to try a "better" jQuery IDE so i got Dreamweaver CS5.5. Am developing the apps in Dreamweaver, then testing and building them in XDK. Problem is the apps function well when I test them in Dreamweaver, and in the XDK emulator - good response, speed and expected results. But when I build the app in XDK and install it on my android phone, its performance is terrible - I have to wait about 10 secs after "touching" before the new page loads (jqueryMobile 1.0/jquery 1.5). Sometimes, when I touch a button, the current page first flicks a bit before it loads the next page, though it loads almost immediately. (jqueryMobile 1.4.2/jquery1.10.2)
What could be the cause of this performance difference, and can I get a fix to it?
Upvotes: 0
Views: 1075
Reputation: 2310
Regardless of which tool you use to create your app, the runtime is provided by the target device, not by the development tool. When you create a hybrid HTML5 app you are not creating a compiled app, you are creating an HTML5 package that will be interpreted by the target device's embedded web runtime. Thus, it doesn't matter which version of the XDK or Dreamweaver you use to create your app, the end result runs inside of that "embedded web runtime" on the target device, when you package it up as a mobile app; and the performance and feature set you get will vary as a function of the target (similar to the variations you encounter with different desktop browsers).
The only exception to this rule is if you provide an alternate web runtime for your hybrid HTML5 app; which can only be done on Android devices (an alternate web runtime cannot be provided on Windows and iOS mobile devices, for legal and technical reasons). In the case of the Intel XDK, you have the option to build using Crosswalk for Android. This build option includes a replacement web runtime and can be installed on any Android 4.0 and higher device. See the comments for a few more details. The Crosswalk web runtime, that is included inside of your APK, is consistent across all devices, you get the same feature set and relative performance across all devices (which you do not get when using the embedded web runtime).
jQuery Mobile is actually quite "heavy" when it comes to running inside of the typical Android embedded web runtime. It is better suited to usage inside the Chrome mobile browser on Android, which has access to more memory and also has more up-to-date features than the typical embedded Android web runtime. Thus the reason for the Crosswalk build is to overcome this deficiency in the typical Android embedded web runtime.
Upvotes: 1