embedded-sdmmc-rs icon indicating copy to clipboard operation
embedded-sdmmc-rs copied to clipboard

Add a block cache

Open thejpster opened this issue 5 years ago • 2 comments

It would improve performance if we had a write-through block cache, particularly in the cluster allocation loop or for multiple small writes (as we'd avoid the repeated reads).

The user would need to supply the storage, and we just need a basic structure to track which sectors are cached (e.g. a HashMap). Maybe using heapless?

thejpster avatar Oct 31 '19 10:10 thejpster

It might also help if read and write were done through closures instead of by copying memory.

thejpster avatar Oct 31 '19 10:10 thejpster

The managed crate also has some useful structures, and it's used with good success on smoltcp.

thalesfragoso avatar Oct 11 '20 01:10 thalesfragoso