Infinite scroll is lag in android


#1

Hi,
I have try on infinite scroll like this


it’s work well on browser but it’s lag when installed app
but if I change page or open sidemenu and come back to this infinite scroll page is back to normal
for example.
step 1 open app and infinite scroll is on first page
step 2 try to scroll and found out that very lag
step 3 open sidemenu
step 4 close sidemenu
step 5 try to scroll again and found it’s not lag anymore
Is it a bug or something?
for device I try experiment is Galaxy Nexus with Android 4.3
and with ionic framework 1.0.0-beta.9


#2

Can you post a more accurate codepen? The example you posted works fine on my android device. Maybe it’s an issue else where in your code?


#3

Okay, this is my example code and I had already try to run on my device (side menu is on right)


#4

In your app, you were adding a new item basically every time you scrolled. I added a bit more data at the start and a timeout to get the app to slow down a bit.


#5

Thank you, but the main problem is not disappear (even I had put more code like you did)
I had try on both emulator (GenyMotion) and my device too, not sure what version of your android device?
for more information, the lag problem is happened when I try to scroll that page even I didn’t scroll to the bottom for load more data. (so I guess this problem is not from loading)
but when I remove ion-infinite-scroll it’s work fine


#6

Did some more testing on an actual device and go the lagging you described. I ended up switching to collection-repeat which improved the performance and reduced the lag


#7

That’s worked , Thank you so much!


#8

@mhartington In this example, infinite scroll loading icon is shown hidden behind header bar not at the bottom. I am facing same problem when using infinite scroll with collection repeat. My mark up is similar like yours.


#9

looks like an open issue yet https://github.com/driftyco/ionic/issues/1380