deckerst / aves

Aves is a gallery and metadata explorer app, built for Android with Flutter.
BSD 3-Clause "New" or "Revised" License
2.77k stars 106 forks source link

Gallery is slow to load new images and videos on startup #1286

Closed wefalltomorrow closed 1 week ago

wefalltomorrow commented 1 week ago

Describe the bug Whenever new images or videos are added to the gallery, it takes a while to load when opening the app. I've attached a video below as an example, if there's more photos/videos it takes even longer. Other gallery apps don't seem to have this issue. Is there a way to run Aves in the background so it can constantly cache new media?

System information and logs: Package: deckers.thibault.aves Installer: com.android.vending Aves version: 1.11.17-play, build 136 Flutter: stable 3.24.4 Android version: 13, API 33 Android build: TQ3A.230901.001 Device: Xiaomi M2101K6G Support: dynamic colors=true, geocoder=true, HDR=true Mobile services: ready Connectivity: wifi, vpn System locales: en_AU Storage volumes: /storage/emulated/0/, /storage/36FA-49B7/ Storage grants: /storage/emulated/0/Movies/, /storage/emulated/0/Pictures/, /storage/emulated/0/DCIM/ Error reporting: false

https://github.com/user-attachments/assets/6a9f60d4-4a17-47e7-9f9b-3530c9ea43a0

deckerst commented 1 week ago

The "loading" delay is proportional to your whole collection size, not the new items. It's usually a reasonable delay for reasonably sized collections. On my device with ~15000 items the loading delay is insignificant (a second maybe). That said, nothing prevents you from having 250 000 items, and then the loading delay would become painful. But in that case, Aves may not be the right app for you.

Following the "loading" step, there's the "cataloguing" step (on your video we see there are 10 new items). It parses newly discovered items metadata, rating, tags, etc. About background work, "cataloguing" is pushed to the background if there are many new items (> 300 items, if my memory serves), but otherwise it's done in the app. In any case, you don't need to wait for the "cataloguing" step to complete for you to use the app.

Comparing with other galleries is meaningless, as they do not provide the same features.

I understand the delay can become significant for large collections, but I don't intend to change the way data is loaded at startup, because it then allows instant search/filtering/hiding derived from the collection metadata.