Hi, I'm using File exists in a loop checking if it exists to use the record image or if it does not exists use a generic image.
B4X:
If File.Exists(File.DirAssets,IzProd&"_img.png") = True Then
' bmp = LoadBitmap(File.DirAssets, IzProd&"_img.png")
' Else
' bmp = LoadBitmap(File.DirAssets, "NoImage.png")
End If
As you can see I've commented all except the if file.exists trying to find the problem.
Compiling in Debug mode it works ok, in release mode it works very very slow.
In debug mode the asset files are not packed inside the APK so it is faster to access them.
You know which files exist in File.DirAssets. You can create a text file with all the files, read it with File.ReadList and then check whether the file exist based on this list.
I did experience the same issue.
When loading a page that issues multiple calls to File.Exists it took couple of seconds to load ( on average over 100mSec per call )
In debug mode the asset files are not packed inside the APK so it is faster to access them.
You know which files exist in File.DirAssets. You can create a text file with all the files, read it with File.ReadList and then check whether the file exist based on this list.