Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(mobile): sync device album asset first #10666

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alextran1502
Copy link
Contributor

@alextran1502 alextran1502 commented Jun 27, 2024

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.

@fyfrey
Copy link
Contributor

fyfrey commented Jun 28, 2024

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)

@alextran1502
Copy link
Contributor Author

@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

@fyfrey
Copy link
Contributor

fyfrey commented Jun 28, 2024

@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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants