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

YPAlbumsManager.fetchAlbums() is too slow for users with many albums #803

Open
BillBunting opened this issue Sep 28, 2023 · 0 comments
Open

Comments

@BillBunting
Copy link

Is your feature request related to a problem? Please describe.
Users on iPhones (any current iPhone / iOS including 17) when choosing to view albums experience long loading times about 0.075 seconds per album before albums display. For example, a user with iOS 17.0.2 on an iPhone 13, with 280 albums experiences a load delay of ~22 seconds. A typical user may have about 10 to 50 albums and will experience a 1 to 3 second delay.

Describe the solution you'd like
I'm requesting a configuration option to pre-cache the albums or a refactor to make the code that loads the albums, YPAlbumsManager.fetchAlbums(), faster. The call to PHImageManager.default().requestImage is slow.

Describe alternatives you've considered
I already attempted pre-caching the albums in YPPickerVC, but by that point, the user may already want to see albums and the pre-caching will not complete in time. Currently, the speed is doubled by using options.deliveryMode = .fastFormat vs the current .opportunistic for PHImageRequestOptions, so I'm using that setting for now. I may also create a single instance of YPImagePicker within my app, load the albums (requires exposing YPAlbumsManager.fetchAlbums), and reuse the picker as needed. Please let me know if there are other suggestions or workarounds.

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

No branches or pull requests

1 participant