Handling large amounts of data


I’m developing an app where we make use of an API to fetch large amounts of data and display them in a list.
The API-call itself takes about 3 seconds to load and display the list with the data, after completing the API-request, we store the data into the localstorage so the next time we don’t need to execute the request again. We suspected that storing the dataset into the localstorage would speed up the loading time, but it looks like the size of the data is the problem. Displaying the list based on the localstorage still needs a second to build.

Does anyone have a suggestion on how to improve the performance on handling data and display them in a list with ng-repeat? Is there a way to save the view-state, so it doen’t get destroyed after switching to another view / controller?

Any other solutions / tips would be great!

I’ve found using a collection-repeat with ion-infinite-scroll is the fastest for loading time. I call the data on initial app load and store it in a service.

There are a few codepens available for collection-repeat and infinite scroll, but here is one by mhartington: http://codepen.io/mhartington/pen/rbais

Are you using beta 14? The view should be cached unless you are disabling the cache.

1 Like

Thank you for your fast response, after some changes in the structure we are using the collection-repeat now instead of the ng-repeat. Also we are using bindonce to narrow the amount of watchers in the list. We also decided to cut the many lists we have into smaller sections spread over different pages.

Your suggestions to use beta 14 also helped to improve the performance with the default caching method!

1 Like