-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Pagination for loading assets? #29
Comments
In reality, the lib doesn't load any image/video data until it is displayed on the screen. The lib only loads the PHAsset objects from the photo library and load thumbnails only when it needs to display images/videos. It's hard to be a root cause for this situation. I've tried with my own device contains ~300 images and video, the lib load and display the first screen immediately without any problem. So it would better if you can provide more information about the environment that you did the test on, or please provide a demo project for easy to reproduction. |
Thanks for the quick reply! I think 300 is not a good size to test - e.g. my Photos app contains 22,888 photos, and I think a typical person who has used iPhone for a few years would at least have 5000 photos, so probably test with 9000 photos? Just run the FMPhotoPicker example project on my phone would reproduce the issue - it shows a white screen for 2 seconds before showing the photos, and that's on iPhone XS, so it would be much slower on an older phone. |
Did an initial investigation and this line caused the most time: I think we should lazily load objects here, and call |
When I present the picker, the UI loads up very slowly, and if I tap on the top bar it immediately goes to the very first photo of my photo library, which makes me believe it loaded up the entire library's thumbnails upon opening, and that's probably the major cause of the slowless. Could we make the load paginated and only load more as we scroll up?
The text was updated successfully, but these errors were encountered: