Replies: 2 comments 3 replies
-
Hi @megapro17 , |
Beta Was this translation helpful? Give feedback.
2 replies
-
I have to implement cache logic manually? Is there any infomation or code that could help me? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a device that does not normally support random read operations. It has several reading modes. The fastest one is sequential read mode, which reads files in parts, one at a time, each part cannot be larger than 64k. In this mode I can't set the offset and length. I can only start reading the file from the beginning, and cancel it at any time if I need to.
As far as I understand, the system does not use this mode of operation, even when copying a file normally. The ReadFiles function is called continuously until the file is copied completely and the maximum buffer size is only 1048576 (I also wanted to know if it can be changed in any way).
There is also a second function that can read a file from any offset and any length, but it is much slower.
What is the most efficient way I can implement such a file system? I want the best sequential read performance. Maybe create a caching mechanism that would store the beginning of a few megabytes of each file, and give them to the system on demand? And when a sequential read is detected, can I use another mode of operation that will cache the file to memory and then copy it to the system buffers in parallel? Sounds complicated, maybe there is a better way?
Beta Was this translation helpful? Give feedback.
All reactions