在 Android 中,外部存储中的文件和内部存储中的文件加载哪个更快?
在 Android 中,外部存储中的文件和内部存储中的文件加载哪个更快?我猜测在许多手机中,例如摩托罗拉 Droid,用于内部和外部存储的 SD 卡(闪存)是相同的。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我想系统的内部存储器会更快。
I imagine that the internal memory is going to be quicker for the system.
这将取决于内部使用的闪存类型和外部 SD 卡的分类。例如,如果用户拥有 6 类 SD 卡,则读取速度约为 6 MB/秒,但只有 2 类(大多数设备附带)为 2 MB/秒。
您不应该对内部或外部读/写速度的速度做出任何假设,因为它们会因设备和存储配额(它们的满度)而异。
设计尽可能通用并使用 StrictMode 确保正确的线程使用。
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.
我认为这在很大程度上取决于硬件,包括设备和 SD 卡。一般来说,我希望内部存储速度更快。
至于 SD 卡,请查看速度评级:http://en.wikipedia.org/wiki/ Secure_Digital#Speed_Class_Rating
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
如果您确实需要最快的读取速度,您可以首先通过速度测试进行检查,例如从闪存读取 1M,而不是从 SD 卡读取,以检查哪个更适合您的目的。
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.