Git Product home page Git Product logo

Comments (3)

congnd avatar congnd commented on July 17, 2024

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.

from fmphotopicker.

hyouuu avatar hyouuu commented on July 17, 2024

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.

from fmphotopicker.

hyouuu avatar hyouuu commented on July 17, 2024

Did an initial investigation and this line caused the most time:
https://github.com/tribalmedia/FMPhotoPicker/blob/b791eca55526cd8c64ee4589b6b45a3e8f8dec86/FMPhotoPicker/FMPhotoPicker/source/Utilities/Helper.swift#L153

I think we should lazily load objects here, and call objects(at indexes: IndexSet) around the currently displayed page. I could try to make an improvement later too.

from fmphotopicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.