vauvenal5 / yaga

Nextcloud Yaga - A Nextcloud first gallery app for Android.
https://vauvenal5.github.io/yaga-docs/
GNU General Public License v3.0
136 stars 9 forks source link

Pagination #80

Open vauvenal5 opened 3 years ago

vauvenal5 commented 3 years ago

Currently the app always loads all files form the specified folder(s). In cases where this results in a lot of files (~10k) this process requires a feelable amount of time. Another issue with this approach is, although yet not reported by anybody, the memory consumption of the app. Going form a few files to ~10k loaded files results in almost doubling our memory footprint. In numbers from around 150M to 300M. So a good guess would be that with around 30k files we would run dangerously close to Android killing the app for overusing the memory.

A solution for this is to introduce pagination instead of loading all files at once. This, however, comes with a lot of open issues. We have to touch almost every part of the app for this to work. Any kind of filtering and searching has now to be done by the Nextcloud server to ensure reliable and reproducible results.

This issue will be used to collect all the relevant issues and general ideas for solving this long term.

The following things will have to be done:

vauvenal5 commented 3 years ago

It looks like Nextcloud server is not yet supporting pagination, see https://github.com/nextcloud/ios/issues/845.