-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very low copy speed #401
Comments
Not sure if I understand. You say there should be a faster way to copy but at the same suggest that using larger buffer sizes increases the speed. If the file is corrupt with larger buffer sizes that is a bug in the file system library (maybe?). The allocation unit size should be the cluster size. So this is also probably a bug if you expect something else with 64 KB.
|
see also #406 |
@magnusja |
Problem
I need to copy files from USB to device storage, I do it like so:
this kotlin
copyTo()
method uses default buffer soze:public const val DEFAULT_BUFFER_SIZE: Int = 8 * 1024
(8KB)This operation takes a lot, especially for big video files. If we increase buffer size like
DEFAULT_BUFFER_SIZE * 8
(64KB) then speed will be increased too but this doesn't guarantee that file will be copied successfully. This will work only if Allocation unit size is set >= with this buffer size. There is no way to determine this value from the lib API. Actually we havechunkSize
defined inme.jahnen.libaums.core.fs.FileSystem
but it always retutns 512This is where we can change USB Allocation unit size
Expected behavior
Maybe there is a better/faster way to copy files from USB to internal memory.
Maybe there is a way to determine the right value for USB Allocation unit size so we can use it in order to copy faster.
** @magnusja your feedback is appreciated
The text was updated successfully, but these errors were encountered: