immich
immich copied to clipboard
chore(mobile): sync device album asset first
This PR changes the order of fetching assets on the mobile app to quickly show assets on the timeline by showing local assets first, then fetching remote assets and merging them together.
Did you encounter a situation where this change helps? Getting remote asset information is typically a lot faster than getting local metadata... (Unless you have 10 local assets and 100000 remote)
@fyfrey I tested on my prod instance, in which I have 25_000 assets on my account, 60_000 assets on my partner sharing account, and about 7000 assets locally. First paint on the timeline is much quicker this way. Even if I sit next to 5Ghz AP, it takes about 5-6 seconds for the first paint if we fetch remote assets first
@alextran1502 alright, this is the case if the assets are already hashed. If you clear all app data / reinstall, hashing 7000 assets surely takes longer than the 5 seconds it takes to fetch remote info?
I guess the order of the two sync operations depends on what scenario we want to optimize :-)