You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
[yes ] I searched for existing GitHub issues
[yes ] I updated all Cordova tooling to most recent version
[yes ] I included all the necessary information above
The text was updated successfully, but these errors were encountered:
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.
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 NSDirectoryEnumerator which will do a deep recursive traversal (which isn't what we want)
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.
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: