Re:JQuery Mobile 1.0.1 Released
by untog on Friday January 27, 2012 @11:14AM
(#3518771)
I'm using jQuery Mobile in an app I'm making and I mostly like it. But there's a delay in switching between pages that I just can't track down- all of my pages are local so it's not an AJAX issue. I'm poking through the source code to try and track down the source of the problem, but unless I can find a fix it's going to be the dealbreaker that makes me switch to something else.
A shame, because other than this slowness it's a great platform.
Re:JQuery Mobile 1.0.1 Released
by fiznool on Friday January 27, 2012 @12:26PM
(#3519102)
What you are experiencing might be down to the browser waiting for a double tap when you tap on links and buttons. Google produced an article on implementing fast buttons which describes this phenomenon: http://code.google.com/mobile/articles/fast_buttons.html
From the article:
' ... mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap. For most buttons we are developing we know that there is no double click behavior that we want to handle, so waiting this long to start acting on the click is time wasted for users. '
The article goes on to discuss how to mitigate against this problem. jQuery Mobile's solution is to use virtual events to listen for touch events rather than mouse clicks. Try listening for vmouseup instead of vclick, this could solve the issue. See http://jquerymobile.com/demos/1.0.1/docs/pages/page-scriptin... for more details.
Re:JQuery Mobile 1.0.1 Released
by untog on Friday January 27, 2012 @12:45PM
(#3519203)
It isn't that- I've looked into it myself.
The delay seems to occur somewhere between the pagebeforeshow and pageshow events- so by that point the click action is definitely already registered. But there must be some function call that slows the whole thing down, interestingly, it doesn't on the iPhone simulator, so presumably it's relatively CPU intensive.
Re:JQuery Mobile 1.0.1 Released
by speg on Friday January 27, 2012 @11:48AM
(#3518923)
Glad to hear I'm not the only one. I was stoked to see 1.0 was out, but after doing just the simple quick start I was disappointed with the lag between popups/transitions.
Re:JQuery Mobile 1.0.1 Released
by monsterix on Friday January 27, 2012 @12:16PM
(#3519041)
I second that @speg. My disappointment went beyond slow transitions though.
One instance, for example, was in having "fixed" header/footer on the web-app. The rendition of fixed elements would fade-out and fade-in again once user stopped scrolling. This really felt naive and I decided to do that part myself instead.
Obviously, now the situation has improved that we have property 'fixed' acknowledged on the iPad Safari. Will give 1.1 a look again, thanks to this heads-up!
Re:JQuery Mobile 1.0.1 Released
by someguy235 on Wednesday February 08, 2012 @11:05AM
(#3567018)
I had a similar problem. I know you said that this isn't an AJAX issue, but have you tried using data-ajax="false" in your <a> tags? jQuery mobile uses AJAX for page loads, even on local pages, in order to implement transition effects.
Re:JQuery Mobile 1.0.1 Released
by yesimahuman on Friday January 27, 2012 @02:21PM
(#3519700)
Cograts Todd and team! Looks like some solid improvements in this release.
I am the co-founder of Codiqa (http://codiqa.com), and we are building tools and services to make jQuery Mobile development easier and faster. We are really excited about the project and hope we can help contribute to its success.
Re:JQuery Mobile 1.0.1 Released
by sheppard on Friday January 27, 2012 @07:51PM
(#3520924)
I used JQuery Mobile for the mobile version of our site. Performance is definitely an issue. I believe that it will eventually improve with future versions so I stuck with it and used just a subset of the features that had acceptable performance. The compromise in performance was worth not having to worry about cross-device compatibility.
Specific performance issues I ran into:
1) The page transitions were too slow so I didn't use them at all and instead just do page reloads for everything.
https://github.com/jquery/jquery-mobile/issues/3217
Re:JQuery Mobile 1.0.1 Released
by brunnsbe on Friday January 27, 2012 @12:00PM
(#3518973)
i have done some testing for jQuery Mobile and the problem is that the amount of devices is huge compared to desktop browsers. E.g. someone makes a change to a CSS file to change something simple, but it still has to be tested on all different platforms and devices. Still v1.1 looks promising.
A shame, because other than this slowness it's a great platform.
From the article:
' ... mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap. For most buttons we are developing we know that there is no double click behavior that we want to handle, so waiting this long to start acting on the click is time wasted for users. '
The article goes on to discuss how to mitigate against this problem. jQuery Mobile's solution is to use virtual events to listen for touch events rather than mouse clicks. Try listening for vmouseup instead of vclick, this could solve the issue. See http://jquerymobile.com/demos/1.0.1/docs/pages/page-scriptin... for more details.
The delay seems to occur somewhere between the pagebeforeshow and pageshow events- so by that point the click action is definitely already registered. But there must be some function call that slows the whole thing down, interestingly, it doesn't on the iPhone simulator, so presumably it's relatively CPU intensive.
Let me know if you find a fix!
One instance, for example, was in having "fixed" header/footer on the web-app. The rendition of fixed elements would fade-out and fade-in again once user stopped scrolling. This really felt naive and I decided to do that part myself instead.
Obviously, now the situation has improved that we have property 'fixed' acknowledged on the iPad Safari. Will give 1.1 a look again, thanks to this heads-up!
http://cubiq.org/iscroll-4
And, as you say, use the 'fixed' CSS in newer Safari versions that support it.
http://jquerymobile.com/test/docs/toolbars/bars-fixed.html
And there obviously is improvement over the previous version, in that, earlier there was some flickering of fixed elements on desktop view-port.
I stand corrected, and appreciate the effort jQuery team.
http://jquerymobile.com/demos/1.0.1/docs/pages/page-links.ht...
I am the co-founder of Codiqa (http://codiqa.com), and we are building tools and services to make jQuery Mobile development easier and faster. We are really excited about the project and hope we can help contribute to its success.
Specific performance issues I ran into: 1) The page transitions were too slow so I didn't use them at all and instead just do page reloads for everything. https://github.com/jquery/jquery-mobile/issues/3217
2) The list structure causes scrolling to be too slow so I had to switch to generating the CSS classes and html structures on the server: https://github.com/jquery/jquery-mobile/issues/2855