iscroll icon indicating copy to clipboard operation
iscroll copied to clipboard

Android performance is considerably worse than iOS

Open Dragooon opened this issue 15 years ago • 32 comments

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.

Dragooon avatar Jul 27 '11 18:07 Dragooon

I am having the same experience, it's de-graded quite a bit. I am using a Motorola Milestone running Android 2.2.1.

mdhgriffiths avatar Oct 12 '11 23:10 mdhgriffiths

Same on HTC Desire S with Android 2.3.5 / Sense 3.0

Suor avatar Nov 10 '11 06:11 Suor

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?

matthew-dean avatar Nov 25 '11 21:11 matthew-dean

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?

matthew-dean avatar Nov 25 '11 21:11 matthew-dean

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... :(

amatecha avatar Dec 10 '11 02:12 amatecha

crickets

matthew-dean avatar Dec 13 '11 19:12 matthew-dean

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. :(

amatecha avatar Dec 19 '11 21:12 amatecha

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.

matthew-dean avatar Feb 07 '12 21:02 matthew-dean

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.

Sertion avatar Jun 27 '12 08:06 Sertion

+1. iScroll performance is terrible on the latest Galaxy Note 2

sylvinus avatar Oct 20 '12 14:10 sylvinus

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.

Prinzhorn avatar Oct 20 '12 14:10 Prinzhorn

Yeah I switched to iScroll-lite for Android and its timer is 17ms...

sylvinus avatar Oct 20 '12 16:10 sylvinus

try with useTransform:true, useTransition:true you loose some eyecandies but performance should be better (eg: requestAnimFrame is skipped altogether)

cubiq avatar Oct 20 '12 17:10 cubiq

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 :-/

sylvinus avatar Oct 20 '12 17:10 sylvinus

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

cubiq avatar Oct 20 '12 17:10 cubiq

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?

sylvinus avatar Oct 20 '12 17:10 sylvinus

yes, absolutely. By lighter I mean simpler (not smaller)

cubiq avatar Oct 20 '12 17:10 cubiq

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.

sylvinus avatar Oct 20 '12 17:10 sylvinus

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

sylvainpolletvillard avatar Apr 15 '13 09:04 sylvainpolletvillard

please try iscroll5 dev and report performance on that. thanks! http://lab.cubiq.org/iscroll5/demos/simple/

cubiq avatar Apr 15 '13 09:04 cubiq