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

[iOS] getPhotos take really long compared to previous package #83

Closed
simon-klikkie opened this issue Sep 18, 2019 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@simon-klikkie
Copy link

Bug

I have recently moved to RN 0.60.5 from 0.59
Previously I was using the CameraRoll from react-native but with the upgrade to 0.60.6 I see that CameraRoll has been extracted and moved to this package.
Previously when I ran this

const cameraRollAssetsPromise = CameraRoll.getPhotos({
      assetType: 'Photos',
      first: 10000,
      groupTypes: 'All'
    });

const [cameraRollAssets] = await Promise.all([cameraRollAssetsPromise, albumAssetsPromise]);

This would return within a few seconds using the old CameraRoll.

But when using the CameraRoll from this package, this promise can take up to a minute to return.

Has this behaviour been experienced before?
Is this just a limitation of the new library, or is this something that can be resolved?

Environment info

React native info output:

System:
    OS: macOS 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 72.14 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 11.15.0 - ~/.nvm/versions/node/v11.15.0/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 6.7.0 - ~/.nvm/versions/node/v11.15.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5791312
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    @react-native-community/cli: ^2.9.0 => 2.9.0 
    react: ^16.9.0 => 16.9.0 
    react-native: ^0.60.5 => 0.60.5

Library version: 1.2.1

Steps To Reproduce

  1. Use CameraRoll.getPhotos with the old react-native package to get 10000 photos. results return in a few seconds.
    2.Use CameraRoll.getPhotos with this package to get 10000 photos. results return in minutes.
    ...

Describe what you expected to happen:

  1. I expected the response time of getPhotos to be similar

Reproducible sample code

@cporawat
Copy link

cporawat commented Oct 1, 2019

I have similar issue.
For my case, I use CameraRoll from community package with react-native 0.59 and it's fast. However after upgrade react-native to 0.60.4, getPhotos seems to slow down to a minutes.
Happened only for iOS, Android work fine.

@johanschram
Copy link

Same issue here after upgrading from rn 0.59 to 0.61 and moving from builtin CameraRoll to CameraRoll from community package.

@PondSorawit
Copy link

Same. Is there an alternative way?

@cporawat
Copy link

Anyone found solution for this?

@bartolkaruza bartolkaruza added the bug Something isn't working label Nov 7, 2019
@bartolkaruza
Copy link
Collaborator

could be related to #14

@javache any chance you could help on this issue?

@bartolkaruza
Copy link
Collaborator

Should be fixed by #178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants