Note that there are some explanatory texts on larger screens.

plurals
  1. POFile reading performance on smartphones: internal storage vs. SD card vs. PC hard disk
    primarykey
    data
    text
    <p>My Android application will use big and very big files (i.e. between the size of 10MB and 2GB).</p> <p>I've always been wondering about what hardware is used by smartphones for stable storage, and whether the software (file reading/seeking) considerations are similar here as for PC hard disks. I tried to find information about hardware and have some sort of picture about it (internal storage, SD card), but none of the sources I checked are comprehensive and/or specific enough. My (interrelated) questions are:</p> <ol> <li>What are the major differences that I must take into account when reading big files on a "modern" smartphone (e.g. on an Android 2.2. phone), compared to doing the same thing with a Java application for a PC? (in terms of disk seeking/reading performance; obviously, cellphone RAM is smaller than in a PC, so this must be taken into account in case of buffers etc.)</li> <li>What are the (relevant) major differences between the stable storage hardware used in smartphones compared to PC hard disks? (I know this is a very wide question, so I even appreciate a very brief answer here and possibly a few reliable external URLs)</li> <li>In terms of <code>InputStream</code> reading and seeking (skipBytes), is there a difference (e.g. on Android) between using the internal storage and the SD card (I intentionally didn't write "external storage", because it's not necessarily the SD card on every device)? Is the SD card slower?</li> <li>For example, I would like to read 2MB of data from a 2GB file, and this 2MB data is distributed in many different/distant parts of the file. All offsets are known, so I create an ascending order of offsets and then use <code>BufferedInputStream.read()</code> (e.g. in a <code>DataInputStream</code>) to read them (and using <code>skipBytes()</code> for seeking wherever necessary). Therefore, in the underlying file system, this may require "going through" the entire 2GB file. (E.g. Android uses the linux functions to seek in the file when needed.) However, is seeking as efficient as in a PC hard disk? What about the SD card vs. internal storage in terms of seek efficiency?</li> <li>What are typical data read speeds? (smartphone internal storage vs. SD card vs. PC non-SSD hard disk)</li> </ol> <p>I know benchmarking for my concrete application is a must, but I would welcome a theoretical clarification in the matter as well.</p> <p><strong>IMPORTANT</strong>: when I ask that "... is seeking as efficient as in a PC hard disk?", I don't (only) mean the absolute values but also <strong>the mechanism</strong> of it. That is, if it works based on the same logical principles (= skipping large parts whenever possible), or there are some drawbacks (e.g. such "skipping-based" seeking is not possible on an SD card, and thus skipping is much more -- i.e. <em>non-proportionally</em> -- useless on a smartphone hardware than on a PC hard disk).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload