Hello,
I have found that the access to DirAssets files is extremely slow compared to, for example, DirDefaultExternal.
I have added 2 files from the FILES tab in the IDE, and I have copied the same two files into the DirDefaultExternal directory.
The following code:
gives me 609 milliseconds and 1 millisecond respectively.
I have also found that the list filled with the DirAssets file list does include 4 more objects that are not present in my project.:
Why is the access to DirAssets so slow compared to DirDefaultExternal?
Are those extra objects responsible for the DirAssets slow access?
Requesting the list of the files from the DirAssets directory at runtime seems to freeze the app for a while and that is not a nice experience for the user.
I have found that the access to DirAssets files is extremely slow compared to, for example, DirDefaultExternal.
I have added 2 files from the FILES tab in the IDE, and I have copied the same two files into the DirDefaultExternal directory.
The following code:
B4X:
Dim li As List
Dim now As Long
now=DateTime.now
li=File.ListFiles(File.DirAssets)
Log(DateTime.now-now)
now=DateTime.now
li=File.ListFiles(File.DirDefaultExternal)
Log(DateTime.now-now)
gives me 609 milliseconds and 1 millisecond respectively.
I have also found that the list filled with the DirAssets file list does include 4 more objects that are not present in my project.:
B4X:
(ArrayList) [fonts, images, sounds, webkit]
Why is the access to DirAssets so slow compared to DirDefaultExternal?
Are those extra objects responsible for the DirAssets slow access?
Requesting the list of the files from the DirAssets directory at runtime seems to freeze the app for a while and that is not a nice experience for the user.