-
Notifications
You must be signed in to change notification settings - Fork 760
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
Listdir takes so much time if directory has data more then 3k entries. #605
Comments
154k files in a single directory? ouff... I'm not sure if you're working with android or iOS but on android I'm curious how much time is spent at listFiles or if the bottleneck is mostly in the cordova bridge. I believe the iOS equivilant is here If the bottleneck is at the native API level on iOS, I'm not sure if there is anything that can be done, as far as I can tell iOS doesn't offer any stream API other than For Android, there is a DirectoryStream API but it's an API 26+ API so it's not something that can be used yet... as cordova needs to support API 24. If the bottleneck is at the bridge, then introducing a stream read API might be possible so you don't need to transfer the entire dataset of 154k file entries in one API response, but I personally don't have time to allocate introducing such feature. |
I am working on android ,i am thinking of any option to limit the number of entries |
Bug Report
Problem
What is expected to happen?
What does actually happen?
Information
I made a local gallery in my app and everything works but one directory whatsapp images have total 154000 images inside it and listdir takes 1 minutes or more to give me all entries array ..
Command or Code
Environment, Platform, Device
Version information
Checklist
The text was updated successfully, but these errors were encountered: