Copy link to clipboard
Copied
While I test to load many images using Loader from File.applicationDirectory or File.applicationStorageDirectory, I found something strange.
It took about 2 times longer to load images from File.applicationDirectory than from File.applicationStorageDirectory.
I have googled for a long time, but I found why.
Does anyone know why?
Thank you!!
Is this on Android by chance? If so it makes sense. On Android the applicationDirectory assets are stored in the original .apk (zipped) format and File I/O is automatically abstracted for you so that you think you are accessing files on the filesystem but what you are also doing is extracting the bytes of the files from the zipped contents first.
Same effect can be seen when you see slower copy operations when copying a bunch of individual files one at a time from File.applicationDirectory as opp
...Copy link to clipboard
Copied
Is this on Android by chance? If so it makes sense. On Android the applicationDirectory assets are stored in the original .apk (zipped) format and File I/O is automatically abstracted for you so that you think you are accessing files on the filesystem but what you are also doing is extracting the bytes of the files from the zipped contents first.
Same effect can be seen when you see slower copy operations when copying a bunch of individual files one at a time from File.applicationDirectory as opposed to copying a .zip from applicationDirectory and expanding the zip in another directory instead. Mentioned in this discussion:
File.copyTo (and copyToAsync) extremely slow on Android. e.g. 1/2 second per tiny XML file. Help?
Copy link to clipboard
Copied
Yes, on the Android device.
I am developing a mobile game and I tested image loading time.
Now, it loads many thumbnail images from File.applicationDirectory.
I will have to find another way.
Thank you very much !!