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

Use FF_FS_TINY in FatFS #51

Closed
breakintoprogram opened this issue Apr 14, 2023 · 1 comment
Closed

Use FF_FS_TINY in FatFS #51

breakintoprogram opened this issue Apr 14, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@breakintoprogram
Copy link
Owner

breakintoprogram commented Apr 14, 2023

Each file object (FFOBJID, FIL, DIR) contains a 512 byte buffer cache for file operations. By setting FF_FS_TINY to 1 in ffconf.h this buffer is removed and a global buffer is used. This will make the FatFS file IO a bit easier on memory for user apps.

Acceptance Criteria:

  • The code is not significantly slower after the change
  • No other issues are reported

Benchmarking:

The BASIC file benchm9,bas will run a read/write operation. Base timings before the mod are:

  • Write: 29.85s
  • Read: 14.2s
@breakintoprogram breakintoprogram converted this from a draft issue Apr 14, 2023
@breakintoprogram
Copy link
Owner Author

Time after applying FF_FS_TINY = 1

  • Write: 31.13s (1.28s difference)
  • Read: 15.5s (1.3s difference)

This is over 5000 iterations, so IMHO is an acceptable performance hit.

@breakintoprogram breakintoprogram moved this from In Progress to QA in AGON Quark Firmware Apr 14, 2023
@breakintoprogram breakintoprogram added the enhancement New feature or request label Apr 16, 2023
@breakintoprogram breakintoprogram moved this from QA to Done in AGON Quark Firmware Apr 16, 2023
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
Status: Released
Development

No branches or pull requests

1 participant