Android performance is considerably worse than iOS
When comparing my Galaxy S (Running Gingerbread 2.3.4 with stock samsung browser) to Safari mobile in iPod Touch 3G, the performance is much worse. Even in itself it feels very jerky and laggy, whereas in iTouch it is quite close to a native experience.
Regardless, I'd like to thank you for your efforts and the project is great.
I am having the same experience, it's de-graded quite a bit. I am using a Motorola Milestone running Android 2.2.1.
Same on HTC Desire S with Android 2.3.5 / Sense 3.0
Yeah, I'm surprised that Android would perform so poorly. On a fairly new Nexus S, it is deadly slow to do any scrolling. Is there no hardware acceleration in Android?
Interestingly, I have a site with PhotoSwipe and iScroll on the same site, and PhotoSwipe's carousel transitions are way faster than iScroll. Maybe iScroll could borrow whatever's happening on the Android side for PhotoSwipe?
Yeah I'm quite confused on this as well. Spent tons of time trying to troubleshoot why scrolling is so jumpy/laggy on this Android phone (Nexus S w/Android 2.3.6). No idea why... :(
crickets
Hi Eric,
Matthew forwarded your email to me, where you suggested adding the line with "window.webkitCancelAnimationFrame" added. Unfortunately it had no effect at all on the performance. :(
Looks like this is not planning to be solved for Android? It's a shame. iScroll has way better features, but PhotoSwipe and Swipe.js perform scrolls on Android much faster for some mysterious reason, and those libraries don't really cover scrolling, just carousel swiping.
I know that this is an old ticket, but it's still relevant.
The problem persists even on the faster Android phones with the newer versions of Android like the HTC One X with Android 4.0.3.
+1. iScroll performance is terrible on the latest Galaxy Note 2
Maybe it has something to do with the requestAnimationFrame "polyfill" in https://github.com/cubiq/iscroll/blob/master/src/iscroll.js#L68 (neither iOS nor Android support requestAnimationFrame http://caniuse.com/#search=requestAnimationFrame)
Using 1 as time for setTimeout causes inconsistent behavior, because none of the browsers actually supports such smalls numbers (more like 8ms or more).
A polyfill for requestAnimationFrame is a key point, because mobile is the target platform of iScroll.
Check out how I did it https://github.com/Prinzhorn/skrollr/blob/master/src/skrollr.js#L40 there's a reference to a more in depth article in the comment (http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating)
Just some thoughts, maybe I'm on the wrong track.
Yeah I switched to iScroll-lite for Android and its timer is 17ms...
try with useTransform:true, useTransition:true you loose some eyecandies but performance should be better (eg: requestAnimFrame is skipped altogether)
Yes I'm always using useTransform:true with iScroll !
What's weird on Android is that performance is often inconsistent with the age of the device, e.g. big performance regressions on the very latest devices :-/
with useTransform:true timers are all skipped, so if it is faster it's just because the script is lighter (nothing to do with the polyfill with is not used at all). This is very interesting since we could make the lite version even lighter to achieve better performance
I haven't benchmarked precisely iScroll-lite vs. iScroll without scrollbars. I don't think it has anything to do with script size, but more with complexity of the critical code paths?
yes, absolutely. By lighter I mean simpler (not smaller)
Well I'm all for a iscroll-superlight then ;-) Maybe you could also remove some event triggers. I also saw a patch that added stricter equality operators, not sure how much that could help.
I also have some performance problems with iScroll 4 on recent tablets. It may deal with touch events, because scrolling is fluid when triggered with iscroll.scrollTo(). Strange that it does bettter on old devices : Motorola Xoom 1 : fluid Motorola Xoom 2 : lag Galaxy Tab 2 : lag
Old issue but more important than ever
please try iscroll5 dev and report performance on that. thanks! http://lab.cubiq.org/iscroll5/demos/simple/