I want to display a list view of 970 json output from an api call. When i implented it on android the scroll got a little stuck but it was ok to respond. But when i created the same view with ios , the app just hangs and takes too much time to respond. The app was freezed for several seconds. But when i created a static list with about 100 objects the app scroll works perfectly. Is there a solution for this?
It hangs after the API call is finished and it only wants to render the list - and doesn’t hang when the JSON is local?
Please post your
ionic info output and the code of the list and loading.
@ionic/cli-utils : 1.5.0 Cordova CLI : 7.0.1 Ionic CLI : 3.5.0
@ionic/app-scripts : 1.3.12 @ionic/cli-plugin-cordova : 1.4.1 @ionic/cli-plugin-ionic-angular : 1.3.2 Cordova Platforms : none Ionic Framework : ionic-angular 3.5.0
Node : v6.10.3 OS : Windows 10 Xcode : not installed ios-deploy : not installed ios-sim : not installed npm : 3.10.10
The app hangs even if its local. The problem i found is when displaying all 900 data it will not hang ,actually app freezes. If its data is in between 0-100 it wont. But my app have to show all the data at a time. The app is not at all responding in iOS. Nor any plugin is working. I think ionic 2 is still not stable
Probably it is just too much data for any app framework to show at the same time. Especially if you are doing something unoptimized or complicated in that list.
Did you look into using https://ionicframework.com/docs/api/components/virtual-scroll/VirtualScroll/
This was made to handle bigger amounts of data.
i tried virtual scroll as well but it was also showing error. i will attach the screen shot here for virtual scroll.
I tried putting infinite scroll but there is problem for sorting and searchin
. So cant add that
What error? That is just a thing your IDE doesn’t understand. Virtual Scroll is used and tested in dozens of apps.