Which is faster to load in android, a file from external storage or a file from internal storage?

StackOverflow https://stackoverflow.com/questions/4502996

  •  12-10-2019
  •  | 
  •  

Question

Which is faster to load in android, a file from external storage or a file from internal storage? I am guessing that in many phones like in Motorola Droid the SD Card(flash memory) used for internal and external storage are identical.

Was it helpful?

Solution

This is going to depend on the type of flash memory used internal and the classification of the external SD card. For example if a user has Class 6 SD card the read speed is going to be around 6 MB/second but with only a class 2 (which most devices ship with) is 2 MB/sec.

You shouldn't make any assumptions about the speed of either the internal of external read/write speeds because they will vary per device and per storage quota (how full they are). Design as generically as possible and make use of StrictMode to ensure proper thread usage.

OTHER TIPS

I imagine that the internal memory is going to be quicker for the system.

I would assume that this depends a lot on the hardware, which includes both the device as well as the SD card. In general, I would expect internal storage to be faster.

As for SD cards, check out the speed ratings: http://en.wikipedia.org/wiki/Secure_Digital#Speed_Class_Rating

if you really need to have the fastest read you can check first via a speedtest, e.g. read 1M from flash and than from sdcard to check whats better for your purpose.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top