yaga
yaga copied to clipboard
Pagination
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:
- Read up on WebDav and Nextcloud support for paging.
- Validate/Contribute paging support to Nextcloud Dart lib.
- Delete Syncs have to be solved based on the Activity log instead of file deltas. #77
- Quality checks have to be improved before starting this #9/#8
- Search has to request results from server instead of performing local filtering.
- Offline mode will still load everything? What is the fallback strategy? How does search behave in offline mode?
It looks like Nextcloud server is not yet supporting pagination, see https://github.com/nextcloud/ios/issues/845.