Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

ANR when opening FilePickerActivity with a large Data set #93

Open
adfwhitestar opened this issue Feb 21, 2022 · 2 comments
Open

ANR when opening FilePickerActivity with a large Data set #93

adfwhitestar opened this issue Feb 21, 2022 · 2 comments

Comments

@adfwhitestar
Copy link

Describe the bug
The App will ANR when calling FilePickerActivity and the OS has 100's of large files.

To Reproduce
Steps to reproduce the behavior:

  1. Create an intent to FilePickerAcitivity
  2. pub extra intent.putExtra(
    FilePickerActivity.CONFIGS, Configurations.Builder()
    .setCheckPermission(true)
    .setShowImages(false)
    .setShowVideos(true)
    .enableImageCapture(false)
    .enableVideoCapture(true)
    .setMaxSelection(maxSelection)
    .setSkipZeroSizeFiles(true)
    .build()
    )
  3. Start Activity

Expected behavior
The App shows a loading screen or something while waiting for the grid to appear

** Actual Behavior **
The App will lock up and Show the ANR dialog. if the user clicks "wait" it will attempt to finish the process. (on my device it took about 20 seconds yes there are alot of files on this device) the App will crash if the user does nothing.

Android info (please complete the following information):

  • One Plus 8T
  • Pixel 2
  • Samsung Fold
  • any device with lots of files to parse that can not be done in 16ms

Additional context
This is used in a Video Selection application and the UI locks up and ANRs when calling the file picker. This does not happen on a device with only 10s of files. you need a device that has 100s if not 1000s of files ( even if this is not reproducible this should not be doing any File IO or Parsing on the main thread )

@vinayakmestri
Copy link

I am facing same problem

@sazibislam
Copy link

Any solution so far?

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

No branches or pull requests

3 participants