Thanks - I tried to put frame the impact of using jQuery Vs XUI with
actual performance stats, so I put together a quick & dirty
performance test benchmark application.
1. Starting with an out-of-the-box phonegap application
2. Removed unused features that I assume impact application load time
( "DetectPhoneNumber", "EnableAcceleration" etc...the application I am
working on only uses the "EnableLocation" which I left enabled)
2. Changed index.htm with something resembling
http://extjs.com/playpen/slickspeed/
(but testing only one framework at a time, either XUI or jQuery)
3. Referenced "xui-min-0.9.0.js" in the header of index.htm
(alternatively referenced "jquery132min.js" depending on test)
4. Deployed app to the device (iPhone 3G)
5. Disconnected the device from xCode to test without debugger
interference, started the app and tested each config (XUI or jQuery):
Application load time was typically 4 to 5 sec with jQuery Vs 3sec
with XUI (XUI almost 1.5 x times faster in this config altough
presumably the benefit would be less obvious an app using more than
just "EnableLocation")
Average selector execution time was 5.3ms with jQuery Vs 4.3ms with
XUI (XUI 1.25 x times faster)
For the heck of it I also tested another configuration where I
downloaded & displayed 3 x 9KB pictures in index.htm before executing
the selector speed test. The idea was to assess the impact of filling
the memory with stuff other than javascript. Having loaded XUI or
jQuery from the header didn't seem to make a difference in terms of
the image loading times, and my selector execution times were
essentially unchanged
Feel free to comment/challenge my results or methodology, feedback
always appreciated!
Hugo
> Regardless of how you use your app, online or offline, you are still
> limited by the device. For instance, on the iphone you only have 25K
> of memory to store your application logic before the chipset reads
> from disk, this can be a huge performance hit.
>
> The other consideration isXUIis designed with mobile in mind, this
> means it supports mobile specific gestures and hardware accelerated
> animations. Even after you load in the bloaded cross supportedjQuery,
> you will still need to shim it with these things for your app to work
> smoothly.
>
> Cheers.
>
> Rob Ellis
>
> On Aug 18, 3:45 am, daniel <
goo...@retraced.de> wrote:
>
> > Well i usexui, it has enough functionality for me and the fact that
> >xuihas less browser-compatiblity-code (there are not as many browsers
> > for mobile devices as there are for desktops) makes it execute faster
> > thanjquery. But if you needjquery-functionality try it out if it's
> > fast enough for your needs!
>
> > Greets
>
> > On Aug 18, 8:41 am, Hugo <
hhar...@gmail.com> wrote:
>
> > > New to PhoneGap, playing around and exploring. Can someone help me
> > > understand the argument for usingXUIoverjQuery? I understand that
> > > the smaller size of the js library file is a benefit for an online
> > > app, but when using phonegap I think most developers would opt to
> > > store all libraries of the device, so the size of the libraries
> > > becomes a moot point.
>
> > > If you elected to useXUIoverjQuery, can you tell me what benefit I