Skip to content
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

Defer writes until a full sector is buffered #15

Open
1 of 5 tasks
avsa242 opened this issue Jun 25, 2022 · 0 comments
Open
1 of 5 tasks

Defer writes until a full sector is buffered #15

avsa242 opened this issue Jun 25, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@avsa242
Copy link
Owner

avsa242 commented Jun 25, 2022

Right now even very small writes to a sector write the sector in full to the card, which blocks for a long time. Add logic to wait until the sector buffer is full, or is explicitly flushed by the user.

  • add a separate metadata buffer
  • find a way to eliminate the need to read in the FAT every time fseek() is called, to reduce unnecessary SD access; maybe set a flag indicating what kind of data is currently in the metadata buffer, and if it's the correct FAT sector, then do nothing
  • add a method to 'queue' data
  • add a mechanism for explicitly flushing the write buffer
  • rewrite fwrite() to wait until sector buffer is full
@avsa242 avsa242 added the enhancement New feature or request label Jun 25, 2022
@avsa242 avsa242 self-assigned this Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant