-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtual List poor performance on iOS v2.0-beta4 #6104
Comments
If you remove the images is the performance better? There's some updates that need to happen to ion-img for iOS. Right now Safari doesn't do a good job handling image requests. |
@adamdbradley If i remove the img the perfomance is better, but it is not good enough. |
I have been testing virtual scroll with large lists including thumbnail images for each item as well and have also found some performance issues. I have tried with both ion-img and regular img tags. The main issue I notice is that when I first swipe either up or down there is a noticable stutter and THEN the scrolling starts and is nice and smooth. Seems like just as it leaves the current viewport it stutters for a moment and then goes, almost like it's loading the next set of data and then it's all good. it's a bit better with <ion-img when not using local images. |
I have been testing this further with the same app and find that: on Android device: virtualScroll is very smooth even with 1000+ item lists all with images in Chrome with ionic Serve: virtualScroll is very smooth even with 1000+ item lists all with images on iOS device (iphone6 os9.3): virtualScroll seems to have an initial lag the first time that you scroll, you don't seem to get the standard animation, it stutters and then jumps straight to where your scroll would have ended, subsequent scroll actions on the same list on the same page are much smoother. Very odd. |
just idea, can we use passive eventlistener polyfill (https://github.com/WICG/EventListenerOptions)? |
I just read the blog for the release of beta6 that states that virtualScroll is already faster than collection-repeat and I think this is probably true on Android. on iOS though I have the same large list in colletion-repeat in my old app version and it scrolls fine. with virtualScroll on iOS there is a huge lag when you first start to scroll, it doesn't really animate the scroll, just jumps and stutters and then smooths out a bit but is still not close to what is achieved on the same list with collection-repeat on ionic v1. I have updated to beta6 and tests on an iphone6 and see the same also in the iphone6s emulator. Perfectly smooth in ionic serve or in Android though. Would be great if some attention could be put towards performance on iOS as at the moment it's a complete blocker to letting anyone else start testing on my app. I am happy to help testing on real devices and in browser to validate any changes made if that helps. |
In case this was just related to images on iOS I also tried removing the per item images and just using an icon, same icon for every item and a much shorter list and I still get this big stutter when you first start scrolling. This is the same on beta6 as it is on beta4. Can be reproduced on both the emulator and a real device like the iphone6. tried enabling prodmode as well just in case that granted some extra performance on ios but still the same. retested on android again and Android virtualScroll is awesomely smooth with the same code. |
Found something interesting. Tested with the wkwebview plugin with local webserver, ran through xcode to monitor resource usage and the scrolling is silky smooth and everything works beautifully. Unfortunately wkwebview is not an option for me until I can access storage locations outside of the www/ root. But interesting that the virtualScroll performance looks great here. I then went back to uiwebview and ran through xcode so I could monitor it's resource usage. While resource usage is obviously higher the CPU was still only peaking at 50% memory usage around 80-90mb which is very normal from my experience. So it didn't seem to be a straight performance issue on starting to scroll the list. Interestingly though in the native console I noticed that there IS an exception thrown at the point when the first page with virtualscroll is entered and then a smaller error thrown on every page with virtual scroll after that. This might be what is causing the initial lag and then the poor scrolling performance after. I have pasted the log below from cold app start up to enter the first view with virtualscroll where the large error is thrown, then moving in and out of other views with virtual scroll triggers the smaller errors at the end each time a view is entered. 2016-04-27 09:25:39.359 beta4[5574:2205235] Apache Cordova native platform version 4.1.1 is starting. |
Any chance of some feedback on this? It seems to be a problem that still persists with beta6 and only affected uiwebview on iOS. |
With beta6, we have problems on ios here too. |
Same issues on beta6 with iOS 9.3.2. With ~1600 items. When I try to scroll them list items will blanked and then my app crashed with |
This issue is even worse with beta7. Scrolling is now extremely laggy. ion-img no longer loads images in virtualscroll list after scrolling for me either. virtualscroll on ios uiwebview really needs a bit of love, it's not usable at the moment for me unfortunately. |
Did anyone find any solution for this? I actually have a virtual scroll with just 20 items and it doesn't work well at all. This issue is present in ion-list and ion-select as well. On android works perfectly. |
Yeh it doesn't seem to be better with shorter lists. As I posted above I see errors thrown in the native console when I start to scroll a virtual list. I haven't seen any feedback or comments from the ionic team yet about performance on ios. @adamdbradley I know that ionic2 is in beta state but any chance of a quick update on when virtualscroll on ios is likely to get a little love? It is brilliant on Android for me, far better than collection-repeat ever was and on ios with wkwebview it is also really fast but unfortunately wkwebview has pretty limited application at the moment with all it's limitations. |
Thanks for the feedback and error logs, I'll start looking into improving performance on UIWebView. @evgeniynet Yeah Passive Event Listeners would be awesome here, but sadly we're still constrained by UIWebView. But eventually we will be able to move to Passive Event Listeners which should bump up performance. |
Happy to help out testing if that is useful just let me know |
This issue is related: #6984 |
@ghenry22 Have you been able to test out beta9's virtual scroll? |
@adamdbradley - Yes I have updated to beta9 and it appears much better but still with some issues as I logged in #6984 which make it a bit hard to test thoroughly at the moment. |
Ok thanks, then I'll close this one and we can work off the new issue. |
Short description of the problem:
Well, im trying the virtual list, and it worked perfect in android, it really boost my app in performance, but with iOS i got a really bad performance, it gets really laggy.
I have a list with 450 items and i'm using cards, and each card has some images.
Anyone having this same problem?
Thanks
Which Ionic Version? 2.x
Run
ionic info
from terminal/cmd prompt: (paste output below)Your system information:
Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.0.0-beta.24
Ionic App Lib Version: 2.0.0-beta.14
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v5.6.0
Xcode version: Xcode 7.3 Build version 7D175
The text was updated successfully, but these errors were encountered: