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

Album performance optimization #86

Merged
merged 2 commits into from
Aug 24, 2020
Merged

Conversation

gezihuzi
Copy link
Contributor

@gezihuzi gezihuzi commented Aug 22, 2020

Optimize the internal method of fetchAlbums(forAlbumType type:( to fetch resources only for the default albums using the synchronous method, other albums are fetched asynchronously. This method is not perfect yet, but it has been tested and it works, all that needs to be done now is to update the album list view synchronously when the album information is fetched. I need more people to help me to improve this part of the code or to provide suggestions. Thank you very much.

#62

Modify asynchronous fetching of assets within the album list.
@gezihuzi
Copy link
Contributor Author

After this and previous optimizations, now the albums will load and speed in UI display will be much faster than before, after testing. In iPhone 8, iOS 13.6.1, 87898 photos, 1054 videos, the loading time is 3~5s, there are still some problems at this stage, because in addition to the default albums, other albums load asynchronously, which will lead to missing data when viewing all albums, at this time you need to update the data set and UI synchronously when the asynchronous task is complete.

@gezihuzi
Copy link
Contributor Author

Hi @DragonCherry , I sent you an email with this optimization related question, if you see this comment, please reply to me via email. Thanks.

@DragonCherry DragonCherry merged commit 6fce018 into DragonCherry:develop Aug 24, 2020
@DragonCherry
Copy link
Owner

DragonCherry commented Aug 24, 2020 via email

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

Successfully merging this pull request may close these issues.

2 participants