-
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
Android perfomance (list scroll - ng-repeat) #1322
Comments
I think this is more of an Android issue than it is Ionic. Having ten 800x800 images all be scaled down by the browser dynamically is a huge burden on the GPU. That's great iOS handles it fine, but the bottle neck is the image size and them being downsized by the browser. I'd recommend using smaller images, along with collection-repeat, and remove any css3 effects which would also bog down the GPU, like rounded corners and box shadows. |
How do you handle the images for retina and HD displays? You have to use the double of the size, haven't you? Any ideas? |
You could try using SVGs? |
Have you tried using |
@fredgalvao if I use
@ajoslin do you think that using an SVG with the same image as background can solve the problem? @adamdbradley I'm trying to use What do you suggest as html tree? I need to use a slide-box with 4 slides and in each slide an infinite scroll with ion-refresher. is this good? <ion-slide-box>
<ion-slide>
<ion-content>
<ion-refresher
pulling-text="Pull to refresh..."
refreshing-text="loading..."
on-refresh="doRefresh()">
</ion-refresher>
<ion-list>
<ion-item ng-repeat="item in data.images">
<img ng-src="{{item.location}}" style="width: 100%;">
</ion-item>
</ion-list>
<ion-infinite-scroll
on-infinite="loadMore()"
ng-if="moreDataCanBeLoaded"
distance="5%">
</ion-infinite-scroll>
</ion-content>
</ion-slide>
<ion-slide>
<!-- 2nd slide -->
</ion-slide>
<ion-slide>
<!-- 3rd slide -->
</ion-slide>
<ion-slide>
<!-- 4th slide -->
</ion-slide>
</ion-slide-box> For the other slides I use the same service, just with different images. So same Where $scope.data = {images: [
{location:'/path/to/image.jpg', name:'xxx'},
{location:'/path/to/image.jpg', name:'xxx'},
{location:'/path/to/image.jpg', name:'xxx'}
]}; |
I'm seeing performance issues on Android scrolling as well - lots of janking. There seem to various problems, but the timeline profiler doesn't indicate that image resizing is one of them. I've included a link to the timeline recording I made in Chrome. I can upload more if that's helpful. This is the project https://bitbucket.org/jvanderdoes/inretro. It was created for a hackathon. I've been playing around with it since because I was surprised by the scrolling performance and would love to get the slickness of ionic + performance for future projects. So far my only workable solution has been to set scroll="false" and use the built in scrolling. |
@ajoslin and @adamdbradley So it's something wrong with your scroll! Could yo have a look? Or at least enable the use of infinite-scroll, PTR and collection-repeat with Thanks |
I am having the same issue on a galaxy s5, with about 50 thumbnail files that are 128x128... would love to see improved performance. |
collection-repeat is getting a lot faster very soon, you could try it again then. |
@FreakTheMighty I'm happy to do so (assuming collection-repeat optimizations don't make the point moot), but I'm pretty new to this stuff so I don't know how to go about generating a "performance profile". Any tips appreciated. |
Here you go: dropbox link |
@ajoslin any news? Using the nightly is just a bit better... but still laggy the scroll |
Did you try collection repeat? |
I'm using it... did you check the performance profiles? It's under 30fps! |
I didnt download anything, and won't have time to this week. Next week I'll be back on issues, this is definitely a high priority one to look at. There is also a pull request open that uses native transitions for scrolling, that may help things a lot. |
Cool! Is this one? #1543 I would like to try it! |
@zelphir Build for test http://clip2net.com/s/ilyY0Y |
@rotorgames Thanks, already tried changing the bower.json to https://github.com/rotorgames/ionic.git#wip-transition-scroll It was a bit better, but the app crashed several times... on IOS is better without has-transition="true" Thanks for your help |
@zelphir, changing the bower target won't work, since the release folder is only updated on releases. |
@rotorgames @ajoslin I've tried the bundle made by rotorgames and it's definitely better! Smoother and more fluid... but not perfect.. there are still lags and jerks... I found it a bit better using ng-repeat instead of collection-repeat. And it looks fine also on iOS! Looking forward to seeing a better version merged into ionic! |
@zelphir About your problem. Try to use css property |
@dbaq Ionic now auto-caches templates. With that, is this still an issue? |
@mihirparekh may I know why you used Crosswalk for 4.4.4 Android as it by default comes with chromeview run environment so even with packaing your will with crosswalk, the Ionic app should run fine on 4.4+ Android. As per my understanding crosswalk is good solution for 4.0 to 4.3 versions of Android, right ? |
@gauravdhiman I don't have a logical answer for your query and we also thought same way earlier. However after trying out, we are seeing significant difference in performance even with 4.4.4 (Nexus 5). Can you try for your app and let us know? |
Android 4.4.4's version of chrome is significantly better than the old android browser, but at this point, it's still outdated. Assuming we can implement crosswalk, we may choose to also use it for KitKat projects so we can take advantage of things like scroll events, sub-pixel borders, and better canvas support. |
Any updates about fixing infinite-scroll? Using beta-13 - still very laggy |
I'm having huge performance issues with the demo app (ionic start myApp sidemenu). |
Actually Ionic was created to work fine on IOS but not on Andriod. Since andriod 4.4 (kitkat) it has really better and faster browser which speeds up Ionic very noticeable. But still it is funny that on IPhone4 it works smoothly while on nexus5 it lags. |
Ionic app takes from 50 to 150 mb of Ram. So maybe your lags are because of lack of RAM ? |
Have you guys tried crosswalk? |
Sorry, but his issue has become too vague and is not narrowed into one specific problem. The team recently removed JS scrolling for Android (testing requested: http://forum.ionicframework.com/t/native-scrolling-android-testers-wanted/17059), and made it easy to use Crosswalk from the CLI: http://ionicframework.com/blog/crosswalk-comes-to-ionic/ Additionally, there have many releases since this issue was created with performance improves, caches views, caches templates, and has had a pull to refresh overhaul. Since everyone's app is different, I'm going to close this topic. I'm not denying there aren't any issues, but please create any recreate an issue focused to specific and reproducible problem. |
Been having the same issue using .14-beta build ....built this trail demo http://kendallarneaud.me/mobile/android/AATT/version/0.0.2.3/ using |
I'm having huge scroll problems too, just 30 items list with images. Actually using |
Crosswalk works way better for me. Tested on Xperia Z, Android KitKat 4.4.4 |
@Alexintosh what version test devices you use? although it gets buggy with Android 4.0 and iPhone 4 iOS 7 it was noted to work fine with iPhone 5s with iOS 8 |
I'm using Nexus 5 stock rom with android 5.0.1 |
Wow....that really is bad...i suggest a new framework |
karneaud http://ongpasoaldesarrollo.org/capital_opciony 19.03.2015, 20:09, "karneaud" notifications@github.com:Wow....that really is bad...i suggest a new framework —Reply to this email directly or . |
Alessio http://www.baltdivision.ru/pamm 19.03.2015, 18:14, "Alessio Delmonti" notifications@github.com:I'm using Nexus 5 stock rom with android 5.0.1 —Reply to this email directly or . |
Oleg http://goohoo.net/strategii_robot 14.03.2015, 20:25, "Oleg Aleynik" notifications@github.com:Crosswalk works way better for me. Tested on Xperia Z, Android KitKat 4.4.4 —Reply to this email directly or . |
... |
@Alexintosh I am on Nexus 5 as well and am having issues with ~10 items of images. However, my friend has the iphone6 and it works great on his |
I'm having performance issues on android devices (HTC ONE, HTC ONE M8, so top gamma) and android emulators (official one using GPU and x86 as cpu arch and genymotion).
Basically I have just a simple list of ten elements with an image (different images). On iOS is super fast and smooth (both simulator and iphone), on Android is super slow, buggy and randomly crashes the app (if I scroll too fast).
The images are 800x800px scaled with css width:100% to fit the list width.
The text was updated successfully, but these errors were encountered: